summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2004-07-10 12:36:49 +0000
committerColin Watson <cjwatson@debian.org>2004-07-10 12:36:49 +0000
commitd85a11e29f3dc55b159e0b3413c1309bf9c5095f (patch)
treee7aa997673b574d5535bb5d7da4b0c76f961dc1a
parent9d35f041a8b51e6fed3cd4207efba83d3cb61fd8 (diff)
Apply patch from Darren Tucker to make the PAM authentication SIGCHLD
handler kill the PAM thread if its waitpid() call returns 0, as well as the previous check for -1 (closes: #252676).
-rw-r--r--auth-pam.c4
-rw-r--r--debian/changelog3
2 files changed, 5 insertions, 2 deletions
diff --git a/auth-pam.c b/auth-pam.c
index 361573807..701d85b64 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -97,11 +97,11 @@ sshpam_sigchld_handler(int sig)
97 if (cleanup_ctxt == NULL) 97 if (cleanup_ctxt == NULL)
98 return; /* handler called after PAM cleanup, shouldn't happen */ 98 return; /* handler called after PAM cleanup, shouldn't happen */
99 if (waitpid(cleanup_ctxt->pam_thread, &sshpam_thread_status, WNOHANG) 99 if (waitpid(cleanup_ctxt->pam_thread, &sshpam_thread_status, WNOHANG)
100 == -1) { 100 <= 0) {
101 /* PAM thread has not exitted, privsep slave must have */ 101 /* PAM thread has not exitted, privsep slave must have */
102 kill(cleanup_ctxt->pam_thread, SIGTERM); 102 kill(cleanup_ctxt->pam_thread, SIGTERM);
103 if (waitpid(cleanup_ctxt->pam_thread, &sshpam_thread_status, 0) 103 if (waitpid(cleanup_ctxt->pam_thread, &sshpam_thread_status, 0)
104 == -1) 104 <= 0)
105 return; /* could not wait */ 105 return; /* could not wait */
106 } 106 }
107 if (WIFSIGNALED(sshpam_thread_status) && 107 if (WIFSIGNALED(sshpam_thread_status) &&
diff --git a/debian/changelog b/debian/changelog
index dbdabf05d..71a58cf2a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,9 @@ openssh (1:3.8.1p1-5) UNRELEASED; urgency=low
7 * Disable shadow password support in openssh-server-udeb. 7 * Disable shadow password support in openssh-server-udeb.
8 * Fix non-portable shell constructs in maintainer scripts (thanks, David 8 * Fix non-portable shell constructs in maintainer scripts (thanks, David
9 Weinehall; partial fix for #258517). 9 Weinehall; partial fix for #258517).
10 * Apply patch from Darren Tucker to make the PAM authentication SIGCHLD
11 handler kill the PAM thread if its waitpid() call returns 0, as well as
12 the previous check for -1 (closes: #252676).
10 13
11 -- Colin Watson <cjwatson@debian.org> Wed, 2 Jun 2004 14:26:18 -0300 14 -- Colin Watson <cjwatson@debian.org> Wed, 2 Jun 2004 14:26:18 -0300
12 15