search for: fd_mask

Displaying 20 results from an estimated 25 matches for "fd_mask".

Did you mean: df_mask
2013 Apr 04
15
[Bug 2085] New: fd_mask and howmany are not defined in Android
https://bugzilla.mindrot.org/show_bug.cgi?id=2085 Bug ID: 2085 Summary: fd_mask and howmany are not defined in Android Classification: Unclassified Product: Portable OpenSSH Version: 6.2p1 Hardware: All OS: Linux Status: NEW Severity: minor Priority: P5 Component: Build system...
2001 Aug 20
1
Idletimeout patch, third attempt
...ot a packet, return it. */ if (type != SSH_MSG_NONE) { xfree(setp); + idletimeout_check(type); return type; } /* * Otherwise, wait for some data to arrive, add it to the * buffer, and try again. */ - memset(setp, 0, howmany(connection_in + 1, NFDBITS) * - sizeof(fd_mask)); - FD_SET(connection_in, setp); - - /* Wait for some data to arrive. */ - while (select(connection_in + 1, setp, NULL, NULL, NULL) == -1 && - (errno == EAGAIN || errno == EINTR)) - ; + do { + memset(setp, 0, howmany(connection_in + 1, NFDBITS) * + sizeof(fd...
2001 Jul 17
1
openssh and QNX
...enssh on QNX RTP 6.1, "x86-pc-nto-qnx". Some things to note if anyone should want to update configure and include support for this platform: * The enthropy device is normally /dev/random * INTXX and other similar types are in <stdint.h> * macro howmany, constant NFDBITS and type fd_mask need to be defined. How this can be done has been discussed earlier on this list. * USE_PIPES needs to be defined - socketpair() doesn't seem to be implemented yet. * file /usr/adm/lastlog needs to be created, if it hasn't been already - touch is sufficient. I hope someone has use for th...
2002 May 22
0
[PATCH] connect() timeout
...if (timeout <= 0) + return(connect(sockfd, serv_addr, addrlen)); + + if (fcntl(sockfd, F_SETFL, O_NONBLOCK) < 0) + return -1; + + rc = connect(sockfd, serv_addr, addrlen); + if (rc == 0) + return 0; + if (errno != EINPROGRESS) + return -1; + + fdsetsz = howmany(sockfd+1, NFDBITS) * sizeof(fd_mask); + fdset = (fd_set *)xmalloc(fdsetsz); + memset(fdset, 0, fdsetsz); + FD_SET(sockfd, fdset); + tv.tv_sec = timeout; + tv.tv_usec = 0; + rc=select(sockfd+1, NULL, fdset, NULL, &tv); + + switch(rc) { + case 0: + errno = ETIMEDOUT; + case -1: + return -1; + break; + case 1: + optval = 0; + o...
2008 May 29
0
xproto-7.0.13
...Use Sleep() instead of sleep() on windows James Cloos (2): Fix typo in XF86Keysym.h Add more dead key syms Jeremy Huddleston (3): Apple: Cleaned up some Apple definitions Apple: Define _DARWIN_C_SOURCE otherwise _XOPEN_SOURCE, _POSIX_SOURCE, or _POSIX_C_SOURCE will cause fd_mask to not be defined due to the strict namespace Apple: Added a comment to explain _DARWIN_C_SOURCE Markus Kuhn (1): Added comment to slightly discourage the definition of ever more Unicode keysyms Peter Hutterer (2): Add GenericEvent and xGenericEvent definitions. Bump to 7....
2001 Aug 02
0
patch: properly zeroing fd_set in clientloop
...date select bitmasks and add any bits relevant to channels in * select bitmasks. */ --- channels.c~ Wed Jun 13 15:18:05 2001 +++ channels.c Thu Jul 12 08:32:53 2001 @@ -1160,6 +1160,14 @@ } void +channel_zero_set(fd_set *setp, int maxfdp) +{ + u_int sz = howmany(maxfdp+1, NFDBITS) * sizeof(fd_mask); + + memset(setp, 0, sz); +} + +void channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp, int rekeying) { @@ -1178,8 +1186,8 @@ *writesetp = xmalloc(sz); *maxfdp = n; } - memset(*readsetp, 0, sz); - memset(*writesetp, 0, sz); + channel_zero_set(*readsetp, *max...
2003 May 17
0
opensshd fd_set definition problem
...ib/libc-2.3.2.so) ==1059== by 0x804C560: (within /usr/sbin/sshd) ==1059== Address 0x41363BFC is 0 bytes after a block of size 4 alloc'd ==1058== checked 5467064 bytes. This turns out to be around line 1261 in sshd.c: fd_set *fdset; ...snip... fdsetsz = howmany(maxfd+1, NFDBITS) * sizeof(fd_mask); fdset = (fd_set *)xmalloc(fdsetsz); ...snip... ret = select(maxfd+1, fdset, NULL, NULL, NULL); My question is why don't you use: fdsetsz = sizeof( fd_set ); The 2.4.20 Linux kernel defines fd_set like this: #define __NFDBITS (8 * sizeof(unsigned long))...
2008 Mar 06
0
[ANNOUNCE] xproto 7.0.12
Adam Jackson (1): x11proto 7.0.12 Alan Coopersmith (1): Make Xalloca.h work with Sun C++ compiler Ben Byer (1): fd_mask needs to be defined on OS X, too Daniel Stone (1): Check headers before testing for fds_bits access method (bug #8442) Jeremy Huddleston (2): Changed __DARWIN__ to __APPLE__ Fixed #ifdef checks that were using i386 to use __i386__ git tag: xproto-7.0.12 http://xorg.freedesktop...
2012 Nov 24
0
ssh-keyscan continuity patch --
...cessed until this returns, so this function should not * be used during the interactive session. @@ -1033,6 +1044,9 @@ DBG(debug("packet_read()")); + connclosed = 0; + conntimedout = 0; + setp = (fd_set *)xcalloc(howmany(active_state->connection_in + 1, NFDBITS), sizeof(fd_mask)); @@ -1087,6 +1101,7 @@ } } if (ret == 0) { + conntimedout = 1; logit("Connection to %.200s timed out while " "waiting to read", get_remote_ipaddr()); cleanup_exit(255); @@ -1098,11 +1113,12 @@ sizeof(buf), &cont); } while (len == 0...
2017 Jan 12
3
proposed change to ssh_connect_direct()
On Sat, Jan 7, 2017 at 2:30 PM, Peter Moody <mindrot at hda3.com> wrote: > so I spent a bit of time looking at this and it seems like the only > way to go, at least if I want to keep it in ssh_connect_direct(), is > to use pthreads. further, it seems like getting that accepted is > something of a long shot: Sorry, pthreads is a non-starter. I would have thought that using
2013 Jul 25
11
Call for testing: OpenSSH-6.3
...hange methods if libcrypto has the required support. * A number of portability fixes for Android: * Don't try to use lastlog on Android; bz#2111 * Fall back to using openssl's DES_crypt function on platorms that don't have a native crypt() function; bz#2112 * Test for fd_mask, howmany and NFDBITS rather than trying to enumerate the plaforms that don't have them. bz#2085 * Replace S_IWRITE, which isn't standardized, with S_IWUSR, which is. bz#2085 * Add a null implementation of endgrent for platforms that don't have it (eg Android) bz#208...
2005 Sep 04
2
ControlPersist and multiple X11 forwarding.
Three patches attached. One implements a 'ControlPersist' option, which when used with 'ControlMaster auto' or 'ControlMaster 'yes' make makes the master background itself and stick around after its own primary session is completed. The second causes control clients to pass X11 display, auth proto and auth data over the control socket so that appropriate X11
2013 Sep 13
0
Announce: OpenSSH 6.3 released
...c forwarding code on strict-alignment architectures. * A number of portability fixes for Android: * Don't try to use lastlog on Android; bz#2111 * Fall back to using openssl's DES_crypt function on platorms that don't have a native crypt() function; bz#2112 * Test for fd_mask, howmany and NFDBITS rather than trying to enumerate the plaforms that don't have them. bz#2085 * Replace S_IWRITE, which isn't standardized, with S_IWUSR, which is. bz#2085 * Add a null implementation of endgrent for platforms that don't have it (eg Android) bz#208...
2013 Sep 13
0
Announce: OpenSSH 6.3 released
...c forwarding code on strict-alignment architectures. * A number of portability fixes for Android: * Don't try to use lastlog on Android; bz#2111 * Fall back to using openssl's DES_crypt function on platorms that don't have a native crypt() function; bz#2112 * Test for fd_mask, howmany and NFDBITS rather than trying to enumerate the plaforms that don't have them. bz#2085 * Replace S_IWRITE, which isn't standardized, with S_IWUSR, which is. bz#2085 * Add a null implementation of endgrent for platforms that don't have it (eg Android) bz#208...
2003 Apr 15
0
Connect timeout patch
...if (timeout <= 0) + return(connect(sockfd, serv_addr, addrlen)); + + if (fcntl(sockfd, F_SETFL, O_NONBLOCK) < 0) + return -1; + + rc = connect(sockfd, serv_addr, addrlen); + if (rc == 0) + return 0; + if (errno != EINPROGRESS) + return -1; + + fdsetsz = howmany(sockfd+1, NFDBITS) * sizeof(fd_mask); + fdset = (fd_set *)xmalloc(fdsetsz); + memset(fdset, 0, fdsetsz); + FD_SET(sockfd, fdset); + tv.tv_sec = timeout; + tv.tv_usec = 0; + rc=select(sockfd+1, NULL, fdset, NULL, &tv); + + switch(rc) { + case 0: + errno = ETIMEDOUT; + case -1: + return -1; + break; + case 1: + optval = 0; + o...
2002 Oct 17
0
[PATCH] connect() timeout for OpenSSH-3.5p1
...if (timeout <= 0) + return(connect(sockfd, serv_addr, addrlen)); + + if (fcntl(sockfd, F_SETFL, O_NONBLOCK) < 0) + return -1; + + rc = connect(sockfd, serv_addr, addrlen); + if (rc == 0) + return 0; + if (errno != EINPROGRESS) + return -1; + + fdsetsz = howmany(sockfd+1, NFDBITS) * sizeof(fd_mask); + fdset = (fd_set *)xmalloc(fdsetsz); + memset(fdset, 0, fdsetsz); + FD_SET(sockfd, fdset); + tv.tv_sec = timeout; + tv.tv_usec = 0; + rc=select(sockfd+1, NULL, fdset, NULL, &tv); + + switch(rc) { + case 0: + errno = ETIMEDOUT; + case -1: + return -1; + break; + case 1: + optval = 0; + o...
2000 Sep 12
0
OpenSSH 2.2.0p1 port to QNX 4
...)/(y)) + #endif /* !howmany */ + /* from the Linux kernel */ + //#define __NFDBITS (8 * sizeof(unsigned long)) /* results in 32 under QNX and Linux (A.S.) */ + + /* from Linux's <bits/types.h> */ + /* One element in the file descriptor mask array. */ + typedef unsigned long int __fd_mask; + /* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ + #define __NFDBITS (8 * sizeof (__fd_mask)) /* results in 32 under QNX and Linux (A.S.) */ + + /* from Linux's <sys/select.h> */ + /* Number of bits per word of `fd_set' (some code assumes this is 32). */...
2010 Mar 06
1
ssh-keyscan bug (not really exploitable)
...ount = 0; - char *tname; + int opt, fopt_count = 0, j; + char *tname, *line; + size_t i, line_len; + FILE *fp; extern int optind; extern char *optarg; @@ -808,20 +694,52 @@ main(int argc, char **argv) read_wait_nfdset = howmany(maxfd, NFDBITS); read_wait = xcalloc(read_wait_nfdset, sizeof(fd_mask)); - if (fopt_count) { - Linebuf *lb; - char *line; - int j; - - for (j = 0; j < fopt_count; j++) { - lb = Linebuf_alloc(argv[j], error); - if (!lb) + line = NULL; + + for (j = 0; j < fopt_count; j++) { + if (line == NULL) + line = xmalloc(line_len = BUFSIZ); + + if ((fp = fopen...
2000 Dec 18
2
cross compiling configure errors
Hi all! I want to cross compile openssh to our own CPU and our embedded Linux platform, however I get at least the following errors when running configure: checking whether snprintf correctly terminates long strings... configure: error: can not run test program while cross compiling checking whether getpgrp takes no argument... configure: error: cannot check getpgrp if cross compiling checking
2001 May 14
2
openssh-2.9p1
Hi, 1. I think you should apply the attached patch to openssh-2.9p1, otherwise ssh-keyscan on linux boxes with glibc-2.1 will experience enormous timeout delays. 2. Is there a program like ssh-keyscan for the Version2 (dsa and rsa) keys?? regards Peter Breitenlohner <peb at mppmu.mpg.de> -------------- next part -------------- diff -ur openssh-2.9p1.orig/ssh-keyscan.c