summaryrefslogtreecommitdiff
path: root/auth-passwd.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-02-09 17:08:23 +1100
committerDarren Tucker <dtucker@zip.com.au>2005-02-09 17:08:23 +1100
commit92170a862634bf9ebe958cc75911658d18e30538 (patch)
tree397fc75d254e3227db28dc532527179f21645acb /auth-passwd.c
parent96d4710e3838af8c03a55ce37913568877dd0283 (diff)
- (dtucker) [auth-passwd.c openbsd-compat/port-aix.c] Don't call
disable_forwarding() from compat library. Prevent linker errrors trying to resolve it for binaries other than sshd. ok djm@
Diffstat (limited to 'auth-passwd.c')
-rw-r--r--auth-passwd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/auth-passwd.c b/auth-passwd.c
index fb14f5ce..27ece3f7 100644
--- a/auth-passwd.c
+++ b/auth-passwd.c
@@ -73,7 +73,7 @@ int
auth_password(Authctxt *authctxt, const char *password)
{
struct passwd * pw = authctxt->pw;
- int ok = authctxt->valid;
+ int result, ok = authctxt->valid;
#if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
static int expire_checked = 0;
#endif
@@ -110,14 +110,14 @@ auth_password(Authctxt *authctxt, const char *password)
#if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
if (!expire_checked) {
expire_checked = 1;
- if (auth_shadow_pwexpired(authctxt)) {
- disable_forwarding();
+ if (auth_shadow_pwexpired(authctxt))
authctxt->force_pwchange = 1;
- }
}
#endif
-
- return (sys_auth_passwd(authctxt, password) && ok);
+ result = sys_auth_passwd(authctxt, password);
+ if (authctxt->force_pwchange)
+ disable_forwarding();
+ return (result && ok);
}
#ifdef BSD_AUTH