search for: session_close_by_pid

Displaying 20 results from an estimated 20 matches for "session_close_by_pid".

2001 Oct 25
2
SIGCHLD race *trivial* patch
...if (!channel_still_open()) max_time_milliseconds = 1000; before select()ing. Added this bit of code to server_loop2(): if (child_terminated) { while ((pid = waitpid(-1, &status, WNOHANG)) > 0) session_close_by_pid(pid, status); - child_terminated = 0; + if (session_still_used()) + child_terminated = 0; + if (child_terminated && !channel_still_open()) + break; so that child_terminated...
2001 Sep 28
1
openssh-2.9.9p2 assumes pid_t, uid_t, etc. are not 'long'
...ork even if system integer types are 'long', not 'int'. * entropy.c (prng_check_seedfile, prng_write_seedfile, prng_read_seedfile): Likewise. * serverloop.c (server_loop, server_loop2): Likewise. * session.c (session_dump, session_by_pid, session_exit_message, session_close_by_pid, session_have_children, session_close_by_channel): Likewise. * ssh-agent.c, sshd.c (main): Likewise. * sshpty.c (pty_setowner): Likewise. * uidswap.c: (temporarily_use_uid): Likewise. =================================================================== RCS file: authfile.c,v retrieving...
2001 Jun 12
0
small patch to session.c
In the following code snippit from session.c: void session_close_by_pid(pid_t pid, int status) { Session *s = session_by_pid(pid); if (s == NULL) { debug("session_close_by_pid: no session for pid %d", s->pid); return; } if (s->chanid != -1) session_exit_message(s, status);...
2001 Jul 26
1
Tru64 Unix vs. OpenSSH 2.9p2
..., *writeset = NULL; int rekeying = 0, max_fd, status; pid_t pid; + int fd; debug("Entering interactive session for SSH2."); *************** *** 736,742 **** xfree(writeset); signal(SIGCHLD, SIG_DFL); ! while ((pid = waitpid(-1, &status, WNOHANG)) > 0) session_close_by_pid(pid, status); channel_stop_listening(); } --- 737,745 ---- xfree(writeset); signal(SIGCHLD, SIG_DFL); ! while ((fd = channel_find_open()) >= 0) ! channel_free(fd); ! while ((pid = waitpid(-1, &status, 0)) > 0) session_close_by_pid(pid, status); channel_stop_liste...
2001 Jun 20
8
[Lutz.Jaenicke@aet.TU-Cottbus.DE: 2.9p1: HP-UX 10.20 utmp/wtmp handling broken?]
Hi! I am resending the following message about problems with utmp handling. * In the meantime I had some request in private mail from people asking whether I have new information. * The problem is still persistant in 2.9p2. * My own new investigations show, that the problem only appears with protocol 2, not with protocol 1, I therefore only started to note it when protocol 2 became the
2001 Apr 04
1
compiler warnings about format strings
...sion_free: session %d pid %d", s->self, s->pid); + debug("session_free: session %d pid %ld", s->self, (long)s->pid); if (s->term) xfree(s->term); if (s->display) @@ -1972,7 +1972,7 @@ { Session *s = session_by_pid(pid); if (s == NULL) { - debug("session_close_by_pid: no session for pid %d", s->pid); + debug("session_close_by_pid: no session for pid %ld", (long)s->pid); return; } if (s->chanid != -1) @@ -1996,15 +1996,15 @@ channel_cancel_cleanup(s->chanid); s->chanid = -1; - debug("session_close_by_channel: chann...
2001 Oct 10
7
OpenSSH solaris: bad return code after exec of remote command
Hi OpenSSH developers, I am using openSSH (now 2.9.9p2, but prob occurs in 2.9p2 also) to execute commands on a remote machine which outputs data to stdout then pipes it to another invocation of ssh which connects back to the first machine in the same way, where it starts a program to read and store the output from the command on the second machine. I am using the "command" option in
2009 Mar 24
0
Issue with child process exits
...* block SIGCHLD while we check for dead children */ sigemptyset(&nset); sigaddset(&nset, SIGCHLD); sigprocmask(SIG_BLOCK, &nset, &oset); if (child_terminated) { while ((pid = waitpid(-1, &status, WNOHANG)) > 0 || (pid < 0 && errno == EINTR)) if (pid > 0) session_close_by_pid(pid, status); child_terminated = 0; } sigprocmask(SIG_SETMASK, &oset, NULL); #endif } This code above seems quite odd in that it really should not be required to check the value of child_terminated before calling waitpid since WNOHANG is specified. If no child has had a state change...
2001 Jan 18
1
sigchld_handler2.
...1; - signal(SIGCHLD, sigchld_handler2); errno = save_errno; } --- 109,114 ---- *************** *** 667,672 **** --- 666,672 ---- if (child_terminated) { while ((pid = waitpid(-1, &status, WNOHANG)) > 0) session_close_by_pid(pid, status); + signal(SIGCHLD, sigchld_handler2); child_terminated = 0; } channel_after_select(&readset, &writeset); Alain St-Denis Environment Canada
2005 Jan 19
1
sshd hangs
...ask(SIG_BLOCK, &nset, &oset); if (child_terminated) { while ((pid = waitpid(-1, &status, WNOHANG)) > 0 || (pid < 0 && errno == EINTR)) if (pid > 0) session_close_by_pid(pid, status); child_terminated = 0; } sigprocmask(SIG_SETMASK, &oset, NULL); } waitpid returns -1 with errno == ECHILD. child_terminated is set to FALSE (why?) and that's it. the program returns to the endless loop (for (;;)) in server_loop2() and s...
2005 Jan 24
0
AW: sshd hangs
...CHLD); sigprocmask(SIG_BLOCK, &nset, &oset); if (child_terminated) { while ((pid = waitpid(-1, &status, WNOHANG)) > 0 || (pid < 0 && errno == EINTR)) if (pid > 0) session_close_by_pid(pid, status); child_terminated = 0; } sigprocmask(SIG_SETMASK, &oset, NULL); } while there could be code to remove the hang (have select() in server_loop2() not wait forever, have collect_children detect and handle ECHILD properly) i think that the child proces...
2000 May 15
1
AIX authenticate patches
...+++ serverloop.c Thu May 11 08:17:17 2000 @@ -85,7 +85,6 @@ int save_errno = errno; debug("Received SIGCHLD."); child_terminated = 1; - signal(SIGCHLD, sigchld_handler2); errno = save_errno; } @@ -640,6 +639,7 @@ while ((pid = waitpid(-1, &status, WNOHANG)) > 0) session_close_by_pid(pid, status); child_terminated = 0; + signal(SIGCHLD, sigchld_handler2); } channel_after_select(&readset, &writeset); process_input(&readset); --- session.c.orig Wed May 10 10:23:59 2000 +++ session.c Wed May 10 16:16:06 2000 @@ -27,6 +27,13 @@ #include "ssh2.h&quot...
2000 Nov 08
1
internal error: we do not read, but chan_read_failed
...channel 0: closing efd 10 debug1: channel 0: send close debug1: channel 0: rcvd close debug1: channel 0: full closed2 debug1: channel_free: channel 0: status: The following connections are open: #0 server-session (t4 r0 i8/0 o128/0 fd 8/8) SIGCHLD is caught within serverloop.c. This calls 'session_close_by_pid' which calls 'session_exit_message'. At this point everything seems to be pretty much the same in the original and the modified version. However, next in the modified version is the call to 'session_free' as seen in the latter server output. In the original version 'session_...
2001 Oct 16
1
Defeating Timing Attacks Patch for OpenSSH 2.9.9p2 and 2.9p2
...= wait_until_can_do_something(&readset, &writeset, &max_fd, &nalloc, rekeying); + /* End SD Mod */ + if (child_terminated) { - while ((pid = waitpid(-1, &status, WNOHANG)) > 0) - session_close_by_pid(pid, status); - child_terminated = 0; + while ((pid = waitpid(-1, &status, WNOHANG)) > 0) + session_close_by_pid(pid, status); + child_terminated = 0; } if (!rekeying) -...
2001 Oct 06
1
Defeating Timing Attacks
Hello, In response to the timing analysis attacks presented by Dawn Song et. al. in her paper http://paris.cs.berkeley.edu/~dawnsong/ssh-timing.html we at Silicon Defense developed a patch for openssh to avoid such measures. Timing Analysis Evasion changes were developed by C. Jason Coit and Roel Jonkman of Silicon Defense. These changes cause SSH to send packets unless request not to,
2001 Jul 22
2
Patches for Cray T3Es running Unicossmk and SV1s running Unicos
This patch is against Cray patch against openssh-SNAP-20010710. Here a few notes about them: 1) rijndael does not work on cray due to the fact it is rooted in 32 bits. I looking for a fix, it may come form Wendy Palam. For now the cray default to the following cihpers for ssh version 2 ssh are: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour 2) Crays don't have setitimer so I
2000 Jun 28
4
openssh-2.1.1p1 on Debian slink and potato
Just today I compilied openssh-2.1.1p1 on Debian Slink and Potato both to come out with the same problem. I am compiling them with openssl-0.9.5a.. The configure line I use for openssh is below: ./configure --sysconfdir=/etc/ssh --prefix=/usr --with-ssl-dir=../openssl-0.9.5a So I compile, do a make install restart the sshd daemon and everything seems fine. Then when I do a w at the prompt
2000 May 17
4
Openssh-2.1.0p1 test release
This to announce a test release of 2.1.0p1 before making it widely available. This release includes many fixes to problems reported over the last week. In particular: - spurious error and coredumps caused by the inbuilt entropy gathering - RSAref detection - Compilation fixes for Solaris and others It also contains (completely untested) support for compiling without RSA support. This may be
2002 May 09
0
functions : server_input_channel_req userauth_pubkey
...- -void do_authenticated(Authctxt *); +void do_authenticated(Authctxt *, const char *realname); int session_open(Authctxt*, int); - -int session_input_channel_req(Channel *, const char *); +int session_input_channel_req(Channel *, const char *, const char *realname ); void session_close_by_pid(pid_t, int); void session_close_by_channel(int, void *); void session_destroy_all(void); diff -ru openssh-3.1p1/sshd.c openssh-3.1p1-mods/sshd.c - --- openssh-3.1p1/sshd.c Thu May 9 12:18:37 2002 +++ openssh-3.1p1-mods/sshd.c Thu May 9 12:20:06 2002 @@ -1519,3 +1519,4 @@ #end...
2001 Jul 11
0
Solaris 2.6: Undefined symbol seed_rng
...id_t arg (arg 2) session.c:1615: warning: int format, pid_t arg (arg 2) session.c: In function `session_exit_message': session.c:1896: warning: int format, pid_t arg (arg 4) session.c: In function `session_free': session.c:1937: warning: int format, pid_t arg (arg 3) session.c: In function `session_close_by_pid': session.c:1962: warning: int format, pid_t arg (arg 2) session.c: In function `session_close_by_channel': session.c:1986: warning: int format, pid_t arg (arg 3) session.c:1994: warning: int format, pid_t arg (arg 2) session.c: In function `session_proctitle': session.c:2023: warning:...