summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/auth-passwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/auth-passwd.c')
-rw-r--r--crypto/openssh/auth-passwd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/openssh/auth-passwd.c b/crypto/openssh/auth-passwd.c
index 38f610a..1b39775 100644
--- a/crypto/openssh/auth-passwd.c
+++ b/crypto/openssh/auth-passwd.c
@@ -65,7 +65,9 @@ auth_password(Authctxt *authctxt, const char *password)
{
struct passwd * pw = authctxt->pw;
int ok = authctxt->valid;
+#if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
static int expire_checked = 0;
+#endif
#ifndef HAVE_CYGWIN
if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES)
@@ -92,6 +94,10 @@ auth_password(Authctxt *authctxt, const char *password)
return ok;
}
#endif
+#ifdef USE_PAM
+ if (options.use_pam)
+ return (sshpam_auth_passwd(authctxt, password) && ok);
+#endif
#if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
if (!expire_checked) {
expire_checked = 1;
OpenPOWER on IntegriCloud