diff options
author | dtucker <dtucker> | 2004-02-21 23:23:35 +0000 |
---|---|---|
committer | dtucker <dtucker> | 2004-02-21 23:23:35 +0000 |
commit | a2dd314fe3d1e3f992647689940333bdc2212960 (patch) | |
tree | f3dd911ea72ed6bb3fc560ab4a9a4dfece1f385f /auth-passwd.c | |
parent | 6aa701f0563938793d8f04121bbc33dc28e71036 (diff) | |
download | openssh-a2dd314fe3d1e3f992647689940333bdc2212960.tar.gz |
- (dtucker) [auth-passwd.c] Only check password expiry once. Prevents
multiple warnings if a wrong password is entered.
Diffstat (limited to 'auth-passwd.c')
-rw-r--r-- | auth-passwd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/auth-passwd.c b/auth-passwd.c index 28f29cc6..b9679abd 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -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) @@ -98,9 +99,12 @@ auth_password(Authctxt *authctxt, const char *password) } #endif #if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE) - if (auth_shadow_pwexpired(authctxt)) { - disable_forwarding(); - authctxt->force_pwchange = 1; + if (!expire_checked) { + expire_checked = 1; + if (auth_shadow_pwexpired(authctxt)) { + disable_forwarding(); + authctxt->force_pwchange = 1; + } } #endif |