summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-09-25 23:14:14 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-09-25 23:14:14 +0000
commit164725f40ecda144de706c94778e47dc86ae9257 (patch)
tree3a1cee0ed23c21b31c471b4e35878e0d12c79580
parentdcbb6c2dc9569368f6f38a27ef560a7cd748d2ba (diff)
l) Fix issue where successfull login does not clear failure counts
in AIX. Patch by dtucker@zip.com.au ok by djm
-rw-r--r--ChangeLog6
-rw-r--r--auth-passwd.c16
-rw-r--r--session.c7
3 files changed, 19 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 9eebcdeb..a42c010a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+20020925
+ - (bal) Fix issue where successfull login does not clear failure counts
+ in AIX. Patch by dtucker@zip.com.au ok by djm
+
20020923
- (djm) OpenBSD CVS Sync
- stevesk@cvs.openbsd.org 2002/09/23 20:46:27
@@ -715,4 +719,4 @@
save auth method before monitor_reset_key_state(); bugzilla bug #284;
ok provos@
-$Id: ChangeLog,v 1.2480 2002/09/25 02:20:52 djm Exp $
+$Id: ChangeLog,v 1.2481 2002/09/25 23:14:14 mouring Exp $
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) {
diff --git a/session.c b/session.c
index ed489214..0ccd2006 100644
--- a/session.c
+++ b/session.c
@@ -210,13 +210,6 @@ do_authenticated(Authctxt *authctxt)
close(startup_pipe);
startup_pipe = -1;
}
-#ifdef WITH_AIXAUTHENTICATE
- /* 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;
-#endif /* WITH_AIXAUTHENTICATE */
/* setup the channel layer */
if (!no_port_forwarding_flag && options.allow_tcp_forwarding)