diff options
author | mouring <mouring> | 2002-09-25 23:14:14 +0000 |
---|---|---|
committer | mouring <mouring> | 2002-09-25 23:14:14 +0000 |
commit | 784ba6bfaa484fbe89574f7c7537ddebcf5cdbee (patch) | |
tree | 9b45a42ea9942b01c57db840c8b2df0d7766dd77 /auth-passwd.c | |
parent | 3f186d46e02a889ed6b2795ffc80eb92a3cec62b (diff) | |
download | openssh-784ba6bfaa484fbe89574f7c7537ddebcf5cdbee.tar.gz |
l) Fix issue where successfull login does not clear failure counts
in AIX. Patch by dtucker@zip.com.au ok by djm
Diffstat (limited to 'auth-passwd.c')
-rw-r--r-- | auth-passwd.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/auth-passwd.c b/auth-passwd.c index 17bbd2ce..185db7d6 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -81,6 +81,9 @@ RCSID("$OpenBSD: auth-passwd.c,v 1.27 2002/05/24 16:45:16 stevesk Exp $"); #endif /* !USE_PAM && !HAVE_OSF_SIA */ extern ServerOptions options; +#ifdef WITH_AIXAUTHENTICATE +extern char *aixloginmsg; +#endif /* * Tries to authenticate the user using password. Returns true if @@ -113,7 +116,7 @@ auth_password(Authctxt *authctxt, const char *password) #endif #ifdef WITH_AIXAUTHENTICATE char *authmsg; - char *loginmsg; + int authsuccess; int reenter = 1; #endif @@ -145,7 +148,16 @@ auth_password(Authctxt *authctxt, const char *password) } #endif #ifdef WITH_AIXAUTHENTICATE - return (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0); + authsuccess = (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0); + + if (authsuccess) + /* We don't have a pty yet, so just label the line as "ssh" */ + if (loginsuccess(authctxt->user, + get_canonical_hostname(options.verify_reverse_mapping), + "ssh", &aixloginmsg) < 0) + aixloginmsg = NULL; + + return(authsuccess); #endif #ifdef KRB4 if (options.kerberos_authentication == 1) { |