search for: nfdbit

Displaying 19 results from an estimated 19 matches for "nfdbit".

Did you mean: nfdbits
2001 Aug 20
1
Idletimeout patch, third attempt
...+790,21 @@ /* If we got 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, NFDBI...
2001 Jul 17
1
openssh and QNX
...have compiled openssh 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 some...
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
2012 Nov 24
0
ssh-keyscan continuity patch --
...other data is processed 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);...
2000 Sep 12
0
OpenSSH 2.2.0p1 port to QNX 4
Dear OpenSSH porting developers, finally I succeded in porting OpenSSH to QNX 4. To get things going I had to take over some definitions from Linux' include files, since they are not available under QNX (e.g. the howmany makro, NFDBITS, the lastlog structure). With this email I send a patch with all my changes as well as the file "qnx-term.h" which I created because IXANY and ONLCR are not supported under QNX. Please include my changes into the OpenSSH portable distribution to allow others to install OpenSSH under Q...
2002 May 22
0
[PATCH] connect() timeout
..., optval, rc; + + 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:...
2001 Aug 02
0
patch: properly zeroing fd_set in clientloop
.../* * Allocate/update 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_...
2003 May 17
0
opensshd fd_set definition problem
..._start_main (in /lib/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))...
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
...rypto 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#2087 * Support platf...
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
...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#2087 * Support platf...
2013 Sep 13
0
Announce: OpenSSH 6.3 released
...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#2087 * Support platf...
2003 Apr 15
0
Connect timeout patch
..., optval, rc; + + 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:...
2002 Oct 17
0
[PATCH] connect() timeout for OpenSSH-3.5p1
..., optval, rc; + + 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:...
2010 Mar 06
1
ssh-keyscan bug (not really exploitable)
...lag = 0, log_level = SYSLOG_LEVEL_INFO; - int opt, fopt_count = 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) +...
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
2007 Mar 14
1
sshd gets stuck: select() in packet_read_seqnr waits indefinitely
Dear OpenSSH Portable sshd developers, I'm having a problem where sshd login sessions are occasionally (as often as once a day) getting stuck indefinitely. I enabled debug messages and got a backtrace of a stuck sshd, and I think I've found the bug. I wanted to run it by the list once before filing. sshd version: OpenSSH_4.2p1 FreeBSD-20050903, OpenSSL 0.9.7e-p1 25 Oct 2004
2001 Jul 27
0
Updated ssh-keyscan patch for ssh2 support
...nup(fatal_callback, NULL); + maxfd = fdlim_get(1); if (maxfd < 0) fatal("%s: fdlim_get: bad value", __progname); @@ -603,6 +780,9 @@ fdcon = xmalloc(maxfd * sizeof(con)); memset(fdcon, 0, maxfd * sizeof(con)); + init_rng(); + seed_rng(); + read_wait_size = howmany(maxfd, NFDBITS) * sizeof(fd_mask); read_wait = xmalloc(read_wait_size); memset(read_wait, 0, read_wait_size); @@ -610,12 +790,16 @@ do { while (ncon < MAXCON) { char *name; + int j; host = nexthost(argc, argv); if (host == NULL) break; name = strnnsep(&host, " \t\n&q...