diff options
Diffstat (limited to 'auth-passwd.c')
-rw-r--r-- | auth-passwd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/auth-passwd.c b/auth-passwd.c index beaf0fa6c..7a68e0562 100644 --- a/auth-passwd.c +++ b/auth-passwd.c | |||
@@ -64,7 +64,9 @@ auth_password(Authctxt *authctxt, const char *password) | |||
64 | { | 64 | { |
65 | struct passwd * pw = authctxt->pw; | 65 | struct passwd * pw = authctxt->pw; |
66 | int ok = authctxt->valid; | 66 | int ok = authctxt->valid; |
67 | #if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE) | ||
67 | static int expire_checked = 0; | 68 | static int expire_checked = 0; |
69 | #endif | ||
68 | 70 | ||
69 | #ifndef HAVE_CYGWIN | 71 | #ifndef HAVE_CYGWIN |
70 | if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES) | 72 | if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES) |
@@ -91,6 +93,10 @@ auth_password(Authctxt *authctxt, const char *password) | |||
91 | return ok; | 93 | return ok; |
92 | } | 94 | } |
93 | #endif | 95 | #endif |
96 | #ifdef USE_PAM | ||
97 | if (options.use_pam) | ||
98 | return (sshpam_auth_passwd(authctxt, password) && ok); | ||
99 | #endif | ||
94 | #if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE) | 100 | #if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE) |
95 | if (!expire_checked) { | 101 | if (!expire_checked) { |
96 | expire_checked = 1; | 102 | expire_checked = 1; |