summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--auth-pam.c11
-rw-r--r--debian/changelog6
2 files changed, 15 insertions, 2 deletions
diff --git a/auth-pam.c b/auth-pam.c
index 36dbb7e15..361573807 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -93,10 +93,17 @@ static mysig_t sshpam_oldsig;
93static void 93static void
94sshpam_sigchld_handler(int sig) 94sshpam_sigchld_handler(int sig)
95{ 95{
96 signal(SIGCHLD, SIG_DFL);
96 if (cleanup_ctxt == NULL) 97 if (cleanup_ctxt == NULL)
97 return; /* handler called after PAM cleanup, shouldn't happen */ 98 return; /* handler called after PAM cleanup, shouldn't happen */
98 if (waitpid(cleanup_ctxt->pam_thread, &sshpam_thread_status, 0) == -1) 99 if (waitpid(cleanup_ctxt->pam_thread, &sshpam_thread_status, WNOHANG)
99 return; /* couldn't wait for process */ 100 == -1) {
101 /* PAM thread has not exitted, privsep slave must have */
102 kill(cleanup_ctxt->pam_thread, SIGTERM);
103 if (waitpid(cleanup_ctxt->pam_thread, &sshpam_thread_status, 0)
104 == -1)
105 return; /* could not wait */
106 }
100 if (WIFSIGNALED(sshpam_thread_status) && 107 if (WIFSIGNALED(sshpam_thread_status) &&
101 WTERMSIG(sshpam_thread_status) == SIGTERM) 108 WTERMSIG(sshpam_thread_status) == SIGTERM)
102 return; /* terminated by pthread_cancel */ 109 return; /* terminated by pthread_cancel */
diff --git a/debian/changelog b/debian/changelog
index 1274b1f69..4a2ba9110 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
1openssh (1:3.8.1p1-4) UNRELEASED; urgency=low
2
3 * Kill off PAM thread if privsep slave dies (closes: #248125).
4
5 -- Colin Watson <cjwatson@debian.org> Fri, 28 May 2004 17:26:35 -0300
6
1openssh (1:3.8.1p1-3) unstable; urgency=low 7openssh (1:3.8.1p1-3) unstable; urgency=low
2 8
3 * Add ssh-keygen to openssh-server-udeb. 9 * Add ssh-keygen to openssh-server-udeb.