summaryrefslogtreecommitdiff
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 9eebcdebe..a42c010af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
120020925
2 - (bal) Fix issue where successfull login does not clear failure counts
3 in AIX. Patch by dtucker@zip.com.au ok by djm
4
120020923 520020923
2 - (djm) OpenBSD CVS Sync 6 - (djm) OpenBSD CVS Sync
3 - stevesk@cvs.openbsd.org 2002/09/23 20:46:27 7 - stevesk@cvs.openbsd.org 2002/09/23 20:46:27
@@ -715,4 +719,4 @@
715 save auth method before monitor_reset_key_state(); bugzilla bug #284; 719 save auth method before monitor_reset_key_state(); bugzilla bug #284;
716 ok provos@ 720 ok provos@
717 721
718$Id: ChangeLog,v 1.2480 2002/09/25 02:20:52 djm Exp $ 722$Id: ChangeLog,v 1.2481 2002/09/25 23:14:14 mouring Exp $
diff --git a/auth-passwd.c b/auth-passwd.c
index 17bbd2ceb..185db7d6d 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 $");
81#endif /* !USE_PAM && !HAVE_OSF_SIA */ 81#endif /* !USE_PAM && !HAVE_OSF_SIA */
82 82
83extern ServerOptions options; 83extern ServerOptions options;
84#ifdef WITH_AIXAUTHENTICATE
85extern char *aixloginmsg;
86#endif
84 87
85/* 88/*
86 * Tries to authenticate the user using password. Returns true if 89 * Tries to authenticate the user using password. Returns true if
@@ -113,7 +116,7 @@ auth_password(Authctxt *authctxt, const char *password)
113#endif 116#endif
114#ifdef WITH_AIXAUTHENTICATE 117#ifdef WITH_AIXAUTHENTICATE
115 char *authmsg; 118 char *authmsg;
116 char *loginmsg; 119 int authsuccess;
117 int reenter = 1; 120 int reenter = 1;
118#endif 121#endif
119 122
@@ -145,7 +148,16 @@ auth_password(Authctxt *authctxt, const char *password)
145 } 148 }
146#endif 149#endif
147#ifdef WITH_AIXAUTHENTICATE 150#ifdef WITH_AIXAUTHENTICATE
148 return (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0); 151 authsuccess = (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0);
152
153 if (authsuccess)
154 /* We don't have a pty yet, so just label the line as "ssh" */
155 if (loginsuccess(authctxt->user,
156 get_canonical_hostname(options.verify_reverse_mapping),
157 "ssh", &aixloginmsg) < 0)
158 aixloginmsg = NULL;
159
160 return(authsuccess);
149#endif 161#endif
150#ifdef KRB4 162#ifdef KRB4
151 if (options.kerberos_authentication == 1) { 163 if (options.kerberos_authentication == 1) {
diff --git a/session.c b/session.c
index ed489214d..0ccd2006d 100644
--- a/session.c
+++ b/session.c
@@ -210,13 +210,6 @@ do_authenticated(Authctxt *authctxt)
210 close(startup_pipe); 210 close(startup_pipe);
211 startup_pipe = -1; 211 startup_pipe = -1;
212 } 212 }
213#ifdef WITH_AIXAUTHENTICATE
214 /* We don't have a pty yet, so just label the line as "ssh" */
215 if (loginsuccess(authctxt->user,
216 get_canonical_hostname(options.verify_reverse_mapping),
217 "ssh", &aixloginmsg) < 0)
218 aixloginmsg = NULL;
219#endif /* WITH_AIXAUTHENTICATE */
220 213
221 /* setup the channel layer */ 214 /* setup the channel layer */
222 if (!no_port_forwarding_flag && options.allow_tcp_forwarding) 215 if (!no_port_forwarding_flag && options.allow_tcp_forwarding)