diff options
author | Darren Tucker <dtucker@zip.com.au> | 2004-07-11 16:52:47 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2004-07-11 16:52:47 +1000 |
commit | d81ea20e1a8e5a3ca2b3eda1cc3e55a516e91eff (patch) | |
tree | 4ed095b6574de890832f072725a4d6889b3a35f9 | |
parent | bf7a29b64f7c4edcce514525851f371141f888f1 (diff) |
- (dtucker) [auth-pam.c] Check for zero from waitpid() too, which allows
the monitor to properly clean up the PAM thread (Debian bug #252676).
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | auth-pam.c | 6 |
2 files changed, 8 insertions, 4 deletions
@@ -1,3 +1,7 @@ +20040711 + - (dtucker) [auth-pam.c] Check for zero from waitpid() too, which allows + the monitor to properly clean up the PAM thread (Debian bug #252676). + 20040708 - (dtucker) OpenBSD CVS Sync - dtucker@cvs.openbsd.org 2004/07/08 12:47:21 @@ -1011,4 +1015,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.3316.2.7 2004/07/08 13:14:25 dtucker Exp $ +$Id: ChangeLog,v 1.3316.2.8 2004/07/11 06:52:47 dtucker Exp $ @@ -31,7 +31,7 @@ /* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */ #include "includes.h" -RCSID("$Id: auth-pam.c,v 1.100.2.1 2004/05/24 01:53:42 dtucker Exp $"); +RCSID("$Id: auth-pam.c,v 1.100.2.2 2004/07/11 06:52:47 dtucker Exp $"); #ifdef USE_PAM #if defined(HAVE_SECURITY_PAM_APPL_H) @@ -97,11 +97,11 @@ sshpam_sigchld_handler(int sig) if (cleanup_ctxt == NULL) return; /* handler called after PAM cleanup, shouldn't happen */ if (waitpid(cleanup_ctxt->pam_thread, &sshpam_thread_status, WNOHANG) - == -1) { + <= 0) { /* PAM thread has not exitted, privsep slave must have */ kill(cleanup_ctxt->pam_thread, SIGTERM); if (waitpid(cleanup_ctxt->pam_thread, &sshpam_thread_status, 0) - == -1) + <= 0) return; /* could not wait */ } if (WIFSIGNALED(sshpam_thread_status) && |