diff options
Diffstat (limited to 'auth-pam.c')
-rw-r--r-- | auth-pam.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/auth-pam.c b/auth-pam.c index 4a2841924..0446cd559 100644 --- a/auth-pam.c +++ b/auth-pam.c | |||
@@ -47,7 +47,7 @@ | |||
47 | 47 | ||
48 | /* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */ | 48 | /* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */ |
49 | #include "includes.h" | 49 | #include "includes.h" |
50 | RCSID("$Id: auth-pam.c,v 1.125 2005/07/17 07:04:47 djm Exp $"); | 50 | RCSID("$Id: auth-pam.c,v 1.126 2005/07/17 07:18:50 djm Exp $"); |
51 | 51 | ||
52 | #ifdef USE_PAM | 52 | #ifdef USE_PAM |
53 | #if defined(HAVE_SECURITY_PAM_APPL_H) | 53 | #if defined(HAVE_SECURITY_PAM_APPL_H) |
@@ -130,7 +130,7 @@ sshpam_sigchld_handler(int sig) | |||
130 | if (cleanup_ctxt == NULL) | 130 | if (cleanup_ctxt == NULL) |
131 | return; /* handler called after PAM cleanup, shouldn't happen */ | 131 | return; /* handler called after PAM cleanup, shouldn't happen */ |
132 | if (waitpid(cleanup_ctxt->pam_thread, &sshpam_thread_status, WNOHANG) | 132 | if (waitpid(cleanup_ctxt->pam_thread, &sshpam_thread_status, WNOHANG) |
133 | <= 0) { | 133 | <= 0) { |
134 | /* PAM thread has not exitted, privsep slave must have */ | 134 | /* PAM thread has not exitted, privsep slave must have */ |
135 | kill(cleanup_ctxt->pam_thread, SIGTERM); | 135 | kill(cleanup_ctxt->pam_thread, SIGTERM); |
136 | if (waitpid(cleanup_ctxt->pam_thread, &sshpam_thread_status, 0) | 136 | if (waitpid(cleanup_ctxt->pam_thread, &sshpam_thread_status, 0) |
@@ -780,7 +780,7 @@ sshpam_respond(void *ctx, u_int num, char **resp) | |||
780 | buffer_init(&buffer); | 780 | buffer_init(&buffer); |
781 | if (sshpam_authctxt->valid && | 781 | if (sshpam_authctxt->valid && |
782 | (sshpam_authctxt->pw->pw_uid != 0 || | 782 | (sshpam_authctxt->pw->pw_uid != 0 || |
783 | options.permit_root_login == PERMIT_YES)) | 783 | options.permit_root_login == PERMIT_YES)) |
784 | buffer_put_cstring(&buffer, *resp); | 784 | buffer_put_cstring(&buffer, *resp); |
785 | else | 785 | else |
786 | buffer_put_cstring(&buffer, badpw); | 786 | buffer_put_cstring(&buffer, badpw); |
@@ -1144,7 +1144,7 @@ sshpam_auth_passwd(Authctxt *authctxt, const char *password) | |||
1144 | * information via timing (eg if the PAM config has a delay on fail). | 1144 | * information via timing (eg if the PAM config has a delay on fail). |
1145 | */ | 1145 | */ |
1146 | if (!authctxt->valid || (authctxt->pw->pw_uid == 0 && | 1146 | if (!authctxt->valid || (authctxt->pw->pw_uid == 0 && |
1147 | options.permit_root_login != PERMIT_YES)) | 1147 | options.permit_root_login != PERMIT_YES)) |
1148 | sshpam_password = badpw; | 1148 | sshpam_password = badpw; |
1149 | 1149 | ||
1150 | sshpam_err = pam_set_item(sshpam_handle, PAM_CONV, | 1150 | sshpam_err = pam_set_item(sshpam_handle, PAM_CONV, |
@@ -1158,7 +1158,7 @@ sshpam_auth_passwd(Authctxt *authctxt, const char *password) | |||
1158 | if (sshpam_err == PAM_SUCCESS && authctxt->valid) { | 1158 | if (sshpam_err == PAM_SUCCESS && authctxt->valid) { |
1159 | debug("PAM: password authentication accepted for %.100s", | 1159 | debug("PAM: password authentication accepted for %.100s", |
1160 | authctxt->user); | 1160 | authctxt->user); |
1161 | return 1; | 1161 | return 1; |
1162 | } else { | 1162 | } else { |
1163 | debug("PAM: password authentication failed for %.100s: %s", | 1163 | debug("PAM: password authentication failed for %.100s: %s", |
1164 | authctxt->valid ? authctxt->user : "an illegal user", | 1164 | authctxt->valid ? authctxt->user : "an illegal user", |