Bugzilla – Attachment 639 Details for
Bug 839
Privilege Separation + PAM locks users out
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Signal PAM "thread" if SIGCHLD is caused by the privsep slave exitting
openssh-pam-hang.patch (text/plain), 1.07 KB, created by
Darren Tucker
on 2004-05-21 13:08:39 AEST
(
hide
)
Description:
Signal PAM "thread" if SIGCHLD is caused by the privsep slave exitting
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2004-05-21 13:08:39 AEST
Size:
1.07 KB
patch
obsolete
>Index: auth-pam.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/auth-pam.c,v >retrieving revision 1.101 >diff -u -p -r1.101 auth-pam.c >--- auth-pam.c 13 May 2004 07:29:35 -0000 1.101 >+++ auth-pam.c 21 May 2004 00:35:23 -0000 >@@ -93,10 +93,17 @@ static mysig_t sshpam_oldsig; > static void > sshpam_sigchld_handler(int sig) > { >+ signal(SIGCHLD, SIG_DFL); > if (cleanup_ctxt == NULL) > return; /* handler called after PAM cleanup, shouldn't happen */ >- if (waitpid(cleanup_ctxt->pam_thread, &sshpam_thread_status, 0) == -1) >- return; /* couldn't wait for process */ >+ if (waitpid(cleanup_ctxt->pam_thread, &sshpam_thread_status, WNOHANG) >+ == -1) { >+ /* 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) >+ return; /* could not wait */ >+ } > if (WIFSIGNALED(sshpam_thread_status) && > WTERMSIG(sshpam_thread_status) == SIGTERM) > return; /* terminated by pthread_cancel */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
djm
:
ok+
Actions:
View
|
Diff
Attachments on
bug 839
:
600
| 639