]> andersk Git - openssh.git/blobdiff - auth-passwd.c
- dtucker@cvs.openbsd.org 2004/02/27 22:44:56
[openssh.git] / auth-passwd.c
index a58dc042b666f804410689b60a84f795da34673c..b9679abd0c5f53baffbd15f1f88381d286a2224d 100644 (file)
@@ -64,6 +64,7 @@ auth_password(Authctxt *authctxt, const char *password)
 {
        struct passwd * pw = authctxt->pw;
        int ok = authctxt->valid;
+       static int expire_checked = 0;
 
 #ifndef HAVE_CYGWIN
        if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES)
@@ -97,6 +98,16 @@ auth_password(Authctxt *authctxt, const char *password)
                return ok;
        }
 #endif
+#if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
+       if (!expire_checked) {
+               expire_checked = 1;
+               if (auth_shadow_pwexpired(authctxt)) {
+                       disable_forwarding();
+                       authctxt->force_pwchange = 1;
+               }
+       }
+#endif
+               
        return (sys_auth_passwd(authctxt, password) && ok);
 }
 
This page took 0.260748 seconds and 4 git commands to generate.