search for: fdset

Displaying 20 results from an estimated 31 matches for "fdset".

Did you mean: fd_set
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
2002 May 22
0
[PATCH] connect() timeout
...s.proxy_command); --- openssh-3.2.2p1/sshconnect.c.ORIG Tue Mar 5 19:59:46 2002 +++ openssh-3.2.2p1/sshconnect.c Tue May 21 15:40:06 2002 @@ -222,6 +222,63 @@ return sock; } +int +timeout_connect(int sockfd, const struct sockaddr *serv_addr, + socklen_t addrlen, int timeout) +{ + fd_set *fdset; + struct timeval tv; + socklen_t optlen; + int fdsetsz, 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 != EIN...
2008 Sep 05
0
[PATCH] Janitorial work on xc_save.c
...ite next-active to store path (%s)\n", - qemu_next_active_path); - exit(1); - } + qemu_next_active_path); /* Wait a while for qemu to signal that it has switched to the new * active buffer */ @@ -208,10 +203,8 @@ tv.tv_usec = 0; FD_ZERO(&fdset); FD_SET(xs_fileno(xs), &fdset); - if ((select(xs_fileno(xs) + 1, &fdset, NULL, NULL, &tv)) != 1) { + if ((select(xs_fileno(xs) + 1, &fdset, NULL, NULL, &tv)) != 1) errx(1, "timed out waiting for qemu to switch buffers\n"); - exit(1); - }...
2003 Apr 15
0
Connect timeout patch
...l, and the application --- openssh-3.6.1p1/sshconnect.c.ORIG Tue Apr 15 23:06:30 2003 +++ openssh-3.6.1p1/sshconnect.c Tue Apr 15 23:08:28 2003 @@ -212,6 +212,61 @@ return sock; } +int +timeout_connect(int sockfd, const struct sockaddr *serv_addr, + socklen_t addrlen, int timeout) +{ + fd_set *fdset; + struct timeval tv; + socklen_t optlen; + int fdsetsz, 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 != EIN...
2002 Oct 17
0
[PATCH] connect() timeout for OpenSSH-3.5p1
...annel, and the application --- openssh-3.5p1/sshconnect.c.ORIG Thu Sep 19 04:05:04 2002 +++ openssh-3.5p1/sshconnect.c Wed Oct 16 14:59:12 2002 @@ -212,6 +212,61 @@ return sock; } +int +timeout_connect(int sockfd, const struct sockaddr *serv_addr, + socklen_t addrlen, int timeout) +{ + fd_set *fdset; + struct timeval tv; + socklen_t optlen; + int fdsetsz, 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 != EIN...
2017 Jun 24
2
[Bug 2732] New: select() is not called properly in ssh_exchange_identification()
...Status: NEW Severity: major Priority: P5 Component: ssh Assignee: unassigned-bugs at mindrot.org Reporter: bagajjal at microsoft.com I found an issue with select() not called properly in the ssh_exchange_identification(). Variable "fdset" is passed as readfd, exceptionfd to the select(). Select() should be called with independent fdset so we should have two different variables instead of reusing the same variable "fdset". The reported issue is in line 566, 567 (sshconnect.c file). -- You are receiving this mail bec...
2003 May 17
0
opensshd fd_set definition problem
.../sbin/sshd) ==1059== by 0x403DC5CC: __libc_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 __NFDBIT...
2020 Jan 21
3
Instrumentation for metrics
> This makes me think that the syslog approach is probably the way to go Yeah, right. Another idea is to mirror the current preauth load via setproctitle()... That makes that data accessible even without a syscall (at least the writing of the data - quering needs syscalls, right), so that can be kept up-to-date and allows a high monitoring frequency as well. Multiple instances of SSHd (on
2017 Apr 28
2
Re: Libvirtd freezes
On 04/27/2017 04:31 PM, Stefano Ricci wrote: > Here is the backtrace of the libvirt process just started [Just a side note, you shouldn't top post on technical lists. Gmail sucks at this.] > > https://pastebin.com/R66myzFp Looks like libvirtd is trying to spawn /usr/bin/qemu-system-x86_64 but it takes ages to init. In the debug logs you might see the actual command line that
2017 Apr 29
2
Re: Libvirtd freezes
...devices"}, {"name": "query-memdev"}, {"name": > "query-machines"}, {"name": "query-kvm"}, {"name": "query-iothreads"}, > {"name": "query-hotpluggable-cpus"}, {"name": "query-fdsets"}, > {"name": "query-events"}, {"name": > "query-dump-guest-memory-capability"}, {"name": "query-dump"}, > {"name": "query-cpus"}, {"name": "query-cpu-definitions"}, {"name":...
2001 Jun 22
1
PATCH: pidfile/sigterm race
.../* Arrange to restart on SIGHUP. The handler needs listen_sock. */ - signal(SIGHUP, sighup_handler); - - signal(SIGTERM, sigterm_handler); - signal(SIGQUIT, sigterm_handler); - - /* Arrange SIGCHLD to be caught. */ - signal(SIGCHLD, main_sigchld_handler); /* setup fd set for listen */ fdset = NULL;
2007 Mar 19
23
puppet hangs while trying to restart a daemon
Hello all, puppet hangs while trying to restart a daemon when the associated config file changes, here the log: Mar 19 11:30:04 ingentTest puppetd[27390]: Starting Puppet client version 0.22.0 puppetd[27390]: Starting configuration run puppetd[27390]: (/ingenttest/qualsevolnode/guaita[guaita]/File[/etc/guaita.conf]/content) synced puppetd[27390]:
2017 Apr 29
0
Re: Libvirtd freezes
...ry-memory-devices"}, {"name": "query-memdev"}, {"name": "query-machines"}, {"name": "query-kvm"}, {"name": "query-iothreads"}, {"name": "query-hotpluggable-cpus"}, {"name": "query-fdsets"}, {"name": "query-events"}, {"name": "query-dump-guest-memory-capability"}, {"name": "query-dump"}, {"name": "query-cpus"}, {"name": "query-cpu-definitions"}, {"name": "query-co...
2016 Jun 03
3
[Bug 2581] New: Coverity patches from Fedora
...ndles intptr, without any possible label (therefore always null), which is dead code (probably copy-paste error from sHostKeyFile) 4. box variable for sandbox context is not freed in the child process after calling ssh_sandbox_child(), which makes it memory leak. 5. server_accept_loop() allocates fdset variable, but does not free it in the end. These are the most obvious problems and it would be nice to have them addressed in the next release. -- You are receiving this mail because: You are watching the assignee of the bug.
2018 Sep 19
1
Re: [PATCH 2/2] Introduce a --key option in tools that accept keys
...eys (whether in UTF-8 or base64 form), it also includes ways to pass keys that are themselves encrypted by a shared key, thus making command line passing safe. Qemu's filename solution also has a nice hack: anywhere that /path/to/filename works for passing something in the filesystem, /dev/fdset/NNN can also be used to pass in something via a file descriptor (inherited from the parent process or previously passed via SCM_RIGHTS). So when libvirt wants to pass multiple secrets to qemu, it pre-creates a single shared key stored in a temporary file, passes that file in by fd, and then us...
2017 Apr 30
0
Re: Libvirtd freezes
...quot;}, {"name": "query-memdev"}, {"name": >> "query-machines"}, {"name": "query-kvm"}, {"name": "query-iothreads"}, >> {"name": "query-hotpluggable-cpus"}, {"name": "query-fdsets"}, >> {"name": "query-events"}, {"name": >> "query-dump-guest-memory-capability"}, {"name": "query-dump"}, >> {"name": "query-cpus"}, {"name": "query-cpu-definitions"}, {&quot...
2020 Jan 21
2
Instrumentation for metrics
...Was that intentional? -- Craig Miskell Site Reliability Engineer | GitLab | Dunedin, New Zealand diff --git a/sshd.c b/sshd.c index 6129b0a..debbdcb 100644 --- a/sshd.c +++ b/sshd.c @@ -1005,7 +1005,7 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s) { fd_set *fdset; int i, j, ret, maxfd; - int startups = 0, listening = 0, lameduck = 0; + int ostartups = -1, startups = 0, listening = 0, lameduck = 0; int startup_p[2] = { -1 , -1 }; char c = 0; struct sockaddr_storage from; @@ -1029,6 +1029,11 @@ server_accept_loop(int *sock_in, int *sock_out, int...
2002 Apr 03
1
[PATCH] connect() timeout
Here is a version of this widely used patch specific for OpenSSH 3.1p1, as it is still not in the main tree (perhap one day...) The patch avoids spending too much time when doing an ssh()/scp() on a down host, as it does not depend off the default TCP timeout used by connect(). Patch was tested on Linux, Solaris and HP-UX. The patch can also be found on:
2020 Mar 25
3
[PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).
Now runs a complete set of tests, notably including the AIO test. File descriptors are passed in and out as plain ints (instead of *os.File) for a couple of reasons: (1) We have to pass the plain int to syscall.Select. (2) Turning an fd into an os.File causes golang to set the blocking flag which is deeply unhelpful. Rich.
2010 Mar 08
0
Announce: OpenSSH 5.4 released
.... Permissions and ownership are always checked when chrooting. bz#1532 * Set close-on-exec on various descriptors so they don't get leaked to child processes. bz#1643 * Fix very rare race condition in x11/agent channel allocation: don't read after the end of the select read/write fdset and make sure a reused FD is not touched before the pre-handlers are called. * Fix incorrect exit status when multiplexing and channel ID 0 is recycled. bz#1570 * Fail with an error when an attempt is made to connect to a server with ForceCommand=internal-sftp with a shell session (i.e....