]> andersk Git - openssh.git/blobdiff - auth-pam.c
- (dtucker) [auth-pam.c] Check for zero from waitpid() too, which allows
[openssh.git] / auth-pam.c
index 76a43a350f28e61ce1ebde1e3f48f00045b9f928..59d20555da1fd7453441a78017952faf7b09f702 100644 (file)
@@ -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) &&
This page took 0.043391 seconds and 4 git commands to generate.