summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--auth1.c12
-rw-r--r--auth2.c12
-rw-r--r--session.c9
4 files changed, 20 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index ea5372b5e..e1b17aaea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
120011113 120011113
2 - (djm) Fix early (and double) free of remote user when using Kerberos. 2 - (djm) Fix early (and double) free of remote user when using Kerberos.
3 Patch from Simon Wilkinson <simon@sxw.org.uk> 3 Patch from Simon Wilkinson <simon@sxw.org.uk>
4 - (djm) AIX login{success,failed} changes. Move loginsuccess call to
5 do_authenticated. Call loginfailed for protocol 2 failures > MAX like
6 we do for protocol 1. Reports from Ralf Wenk <wera0003@fh-karlsruhe.de>,
7 K.Wolkersdorfer@fz-juelich.de and others
4 8
520011112 920011112
6 - (djm) Makefile correctness fix from Mark D. Baushke <mdb@juniper.net> 10 - (djm) Makefile correctness fix from Mark D. Baushke <mdb@juniper.net>
@@ -6891,4 +6895,4 @@
6891 - Wrote replacements for strlcpy and mkdtemp 6895 - Wrote replacements for strlcpy and mkdtemp
6892 - Released 1.0pre1 6896 - Released 1.0pre1
6893 6897
6894$Id: ChangeLog,v 1.1658 2001/11/13 00:20:07 djm Exp $ 6898$Id: ChangeLog,v 1.1659 2001/11/13 12:46:18 djm Exp $
diff --git a/auth1.c b/auth1.c
index 6d40219be..1fbfad90a 100644
--- a/auth1.c
+++ b/auth1.c
@@ -29,10 +29,6 @@ RCSID("$OpenBSD: auth1.c,v 1.25 2001/06/26 16:15:23 dugsong Exp $");
29/* import */ 29/* import */
30extern ServerOptions options; 30extern ServerOptions options;
31 31
32#ifdef WITH_AIXAUTHENTICATE
33extern char *aixloginmsg;
34#endif /* WITH_AIXAUTHENTICATE */
35
36/* 32/*
37 * convert ssh auth msg type into description 33 * convert ssh auth msg type into description
38 */ 34 */
@@ -428,14 +424,6 @@ do_authentication()
428 packet_send(); 424 packet_send();
429 packet_write_wait(); 425 packet_write_wait();
430 426
431#ifdef WITH_AIXAUTHENTICATE
432 /* We don't have a pty yet, so just label the line as "ssh" */
433 if (loginsuccess(authctxt->user,
434 get_canonical_hostname(options.reverse_mapping_check),
435 "ssh", &aixloginmsg) < 0)
436 aixloginmsg = NULL;
437#endif /* WITH_AIXAUTHENTICATE */
438
439 /* Perform session preparation. */ 427 /* Perform session preparation. */
440 do_authenticated(authctxt); 428 do_authenticated(authctxt);
441} 429}
diff --git a/auth2.c b/auth2.c
index eb04ae75b..1920eb32e 100644
--- a/auth2.c
+++ b/auth2.c
@@ -57,10 +57,6 @@ extern ServerOptions options;
57extern u_char *session_id2; 57extern u_char *session_id2;
58extern int session_id2_len; 58extern int session_id2_len;
59 59
60#ifdef WITH_AIXAUTHENTICATE
61extern char *aixloginmsg;
62#endif
63
64static Authctxt *x_authctxt = NULL; 60static Authctxt *x_authctxt = NULL;
65static int one = 1; 61static int one = 1;
66 62
@@ -282,8 +278,14 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method)
282 /* now we can break out */ 278 /* now we can break out */
283 authctxt->success = 1; 279 authctxt->success = 1;
284 } else { 280 } else {
285 if (authctxt->failures++ > AUTH_FAIL_MAX) 281 if (authctxt->failures++ > AUTH_FAIL_MAX) {
282#ifdef WITH_AIXAUTHENTICATE
283 loginfailed(authctxt->user,
284 get_canonical_hostname(options.reverse_mapping_check),
285 "ssh");
286#endif /* WITH_AIXAUTHENTICATE */
286 packet_disconnect(AUTH_FAIL_MSG, authctxt->user); 287 packet_disconnect(AUTH_FAIL_MSG, authctxt->user);
288 }
287 methods = authmethods_get(); 289 methods = authmethods_get();
288 packet_start(SSH2_MSG_USERAUTH_FAILURE); 290 packet_start(SSH2_MSG_USERAUTH_FAILURE);
289 packet_put_cstring(methods); 291 packet_put_cstring(methods);
diff --git a/session.c b/session.c
index 10cefdb44..d0f9072f3 100644
--- a/session.c
+++ b/session.c
@@ -159,7 +159,6 @@ const char *original_command = NULL;
159Session sessions[MAX_SESSIONS]; 159Session sessions[MAX_SESSIONS];
160 160
161#ifdef WITH_AIXAUTHENTICATE 161#ifdef WITH_AIXAUTHENTICATE
162/* AIX's lastlogin message, set in auth1.c */
163char *aixloginmsg; 162char *aixloginmsg;
164#endif /* WITH_AIXAUTHENTICATE */ 163#endif /* WITH_AIXAUTHENTICATE */
165 164
@@ -191,6 +190,14 @@ do_authenticated(Authctxt *authctxt)
191 } 190 }
192#endif 191#endif
193#endif 192#endif
193#ifdef WITH_AIXAUTHENTICATE
194 /* We don't have a pty yet, so just label the line as "ssh" */
195 if (loginsuccess(authctxt->user,
196 get_canonical_hostname(options.reverse_mapping_check),
197 "ssh", &aixloginmsg) < 0)
198 aixloginmsg = NULL;
199#endif /* WITH_AIXAUTHENTICATE */
200
194 /* setup the channel layer */ 201 /* setup the channel layer */
195 if (!no_port_forwarding_flag && options.allow_tcp_forwarding) 202 if (!no_port_forwarding_flag && options.allow_tcp_forwarding)
196 channel_permit_all_opens(); 203 channel_permit_all_opens();