diff options
author | Damien Miller <djm@mindrot.org> | 2001-11-13 23:46:18 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2001-11-13 23:46:18 +1100 |
commit | e49d0966b5e8e4ff4eb993f1b8511932dfcf7bf8 (patch) | |
tree | 8f89c9cfa2f0af078577106fd3492c7af192caf9 | |
parent | 056ca1eb473e2d4bd9fa867feb26f94a36f5d877 (diff) |
- (djm) AIX login{success,failed} changes. Move loginsuccess call to
do_authenticated. Call loginfailed for protocol 2 failures > MAX like
we do for protocol 1. Reports from Ralf Wenk <wera0003@fh-karlsruhe.de>,
K.Wolkersdorfer@fz-juelich.de and others
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | auth1.c | 12 | ||||
-rw-r--r-- | auth2.c | 12 | ||||
-rw-r--r-- | session.c | 9 |
4 files changed, 20 insertions, 19 deletions
@@ -1,6 +1,10 @@ | |||
1 | 20011113 | 1 | 20011113 |
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 | ||
5 | 20011112 | 9 | 20011112 |
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 $ |
@@ -29,10 +29,6 @@ RCSID("$OpenBSD: auth1.c,v 1.25 2001/06/26 16:15:23 dugsong Exp $"); | |||
29 | /* import */ | 29 | /* import */ |
30 | extern ServerOptions options; | 30 | extern ServerOptions options; |
31 | 31 | ||
32 | #ifdef WITH_AIXAUTHENTICATE | ||
33 | extern 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 | } |
@@ -57,10 +57,6 @@ extern ServerOptions options; | |||
57 | extern u_char *session_id2; | 57 | extern u_char *session_id2; |
58 | extern int session_id2_len; | 58 | extern int session_id2_len; |
59 | 59 | ||
60 | #ifdef WITH_AIXAUTHENTICATE | ||
61 | extern char *aixloginmsg; | ||
62 | #endif | ||
63 | |||
64 | static Authctxt *x_authctxt = NULL; | 60 | static Authctxt *x_authctxt = NULL; |
65 | static int one = 1; | 61 | static 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); |
@@ -159,7 +159,6 @@ const char *original_command = NULL; | |||
159 | Session sessions[MAX_SESSIONS]; | 159 | Session sessions[MAX_SESSIONS]; |
160 | 160 | ||
161 | #ifdef WITH_AIXAUTHENTICATE | 161 | #ifdef WITH_AIXAUTHENTICATE |
162 | /* AIX's lastlogin message, set in auth1.c */ | ||
163 | char *aixloginmsg; | 162 | char *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(); |