summaryrefslogtreecommitdiffstats
path: root/auth-pam.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-07-11 16:54:08 +1000
committerDarren Tucker <dtucker@zip.com.au>2004-07-11 16:54:08 +1000
commit5d423f4eceb09c6e26946d4b190a765a3d96c34f (patch)
tree934d792d009c889c759bbb85bfd5f6a1ccfead93 /auth-pam.c
parent3b376f08fbc2d1c89ba0dc2091fd2e3de768cd59 (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).
Diffstat (limited to 'auth-pam.c')
-rw-r--r--auth-pam.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/auth-pam.c b/auth-pam.c
index 36a719fb..5f4200f6 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -47,7 +47,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.110 2004/07/01 04:00:15 dtucker Exp $");
+RCSID("$Id: auth-pam.c,v 1.111 2004/07/11 06:54:08 dtucker Exp $");
#ifdef USE_PAM
#if defined(HAVE_SECURITY_PAM_APPL_H)
@@ -113,11 +113,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) &&