diff options
author | Damien Miller <djm@mindrot.org> | 2003-04-29 23:22:40 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2003-04-29 23:22:40 +1000 |
commit | eab4bae03894f07ea556db4d781795c724245af7 (patch) | |
tree | 30289e5ea867bf4e9246b6a5bfe2f31f664dedc3 /auth-pam.c | |
parent | 0e7f4363f3d7b2ae707709607fd816f663c7449a (diff) |
- (djm) Add back radix.o (used by AFS support), after it went missing from
Makefile many moons ago
- (djm) Apply "owl-always-auth" patch from Openwall/Solar Designer
- (djm) Fix blibpath specification for AIX/gcc
- (djm) Some systems have basename in -lgen. Fix from ayamura@ayamura.org
Diffstat (limited to 'auth-pam.c')
-rw-r--r-- | auth-pam.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/auth-pam.c b/auth-pam.c index b29444e89..f3d1956ea 100644 --- a/auth-pam.c +++ b/auth-pam.c | |||
@@ -38,7 +38,7 @@ extern char *__progname; | |||
38 | 38 | ||
39 | extern int use_privsep; | 39 | extern int use_privsep; |
40 | 40 | ||
41 | RCSID("$Id: auth-pam.c,v 1.56 2003/04/09 10:59:48 djm Exp $"); | 41 | RCSID("$Id: auth-pam.c,v 1.57 2003/04/29 13:22:40 djm Exp $"); |
42 | 42 | ||
43 | #define NEW_AUTHTOK_MSG \ | 43 | #define NEW_AUTHTOK_MSG \ |
44 | "Warning: Your password has expired, please change it now." | 44 | "Warning: Your password has expired, please change it now." |
@@ -201,7 +201,7 @@ void do_pam_cleanup_proc(void *context) | |||
201 | } | 201 | } |
202 | } | 202 | } |
203 | 203 | ||
204 | /* Attempt password authentation using PAM */ | 204 | /* Attempt password authentication using PAM */ |
205 | int auth_pam_password(Authctxt *authctxt, const char *password) | 205 | int auth_pam_password(Authctxt *authctxt, const char *password) |
206 | { | 206 | { |
207 | extern ServerOptions options; | 207 | extern ServerOptions options; |
@@ -215,13 +215,13 @@ int auth_pam_password(Authctxt *authctxt, const char *password) | |||
215 | pamstate = INITIAL_LOGIN; | 215 | pamstate = INITIAL_LOGIN; |
216 | pam_retval = do_pam_authenticate( | 216 | pam_retval = do_pam_authenticate( |
217 | options.permit_empty_passwd == 0 ? PAM_DISALLOW_NULL_AUTHTOK : 0); | 217 | options.permit_empty_passwd == 0 ? PAM_DISALLOW_NULL_AUTHTOK : 0); |
218 | if (pam_retval == PAM_SUCCESS) { | 218 | if (pam_retval == PAM_SUCCESS && pw) { |
219 | debug("PAM Password authentication accepted for " | 219 | debug("PAM password authentication accepted for " |
220 | "user \"%.100s\"", pw->pw_name); | 220 | "%.100s", pw->pw_name); |
221 | return 1; | 221 | return 1; |
222 | } else { | 222 | } else { |
223 | debug("PAM Password authentication for \"%.100s\" " | 223 | debug("PAM password authentication failed for " |
224 | "failed[%d]: %s", pw->pw_name, pam_retval, | 224 | "%.100s: %s", pw ? pw->pw_name : "an illegal user", |
225 | PAM_STRERROR(__pamh, pam_retval)); | 225 | PAM_STRERROR(__pamh, pam_retval)); |
226 | return 0; | 226 | return 0; |
227 | } | 227 | } |