diff options
Diffstat (limited to 'auth1.c')
-rw-r--r-- | auth1.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -66,9 +66,7 @@ do_fake_authloop1(char *user) | |||
66 | get_remote_port()); | 66 | get_remote_port()); |
67 | 67 | ||
68 | #ifdef WITH_AIXAUTHENTICATE | 68 | #ifdef WITH_AIXAUTHENTICATE |
69 | if (strncmp(get_authname(type),"password", | 69 | loginfailed(user,get_canonical_hostname(),"ssh"); |
70 | strlen(get_authname(type))) == 0) | ||
71 | loginfailed(pw->pw_name,get_canonical_hostname(),"ssh"); | ||
72 | #endif /* WITH_AIXAUTHENTICATE */ | 70 | #endif /* WITH_AIXAUTHENTICATE */ |
73 | 71 | ||
74 | /* Indicate that authentication is needed. */ | 72 | /* Indicate that authentication is needed. */ |
@@ -408,8 +406,12 @@ do_authloop(struct passwd * pw) | |||
408 | client_user = NULL; | 406 | client_user = NULL; |
409 | } | 407 | } |
410 | 408 | ||
411 | if (attempt > AUTH_FAIL_MAX) | 409 | if (attempt > AUTH_FAIL_MAX) { |
410 | #ifdef WITH_AIXAUTHENTICATE | ||
411 | loginfailed(pw->pw_name,get_canonical_hostname(),"ssh"); | ||
412 | #endif /* WITH_AIXAUTHENTICATE */ | ||
412 | packet_disconnect(AUTH_FAIL_MSG, pw->pw_name); | 413 | packet_disconnect(AUTH_FAIL_MSG, pw->pw_name); |
414 | } | ||
413 | 415 | ||
414 | /* Send a message indicating that the authentication attempt failed. */ | 416 | /* Send a message indicating that the authentication attempt failed. */ |
415 | packet_start(SSH_SMSG_FAILURE); | 417 | packet_start(SSH_SMSG_FAILURE); |
@@ -430,7 +432,7 @@ do_authentication() | |||
430 | unsigned int ulen; | 432 | unsigned int ulen; |
431 | char *user; | 433 | char *user; |
432 | #ifdef WITH_AIXAUTHENTICATE | 434 | #ifdef WITH_AIXAUTHENTICATE |
433 | char *loginmsg; | 435 | extern char *aixloginmsg; |
434 | #endif /* WITH_AIXAUTHENTICATE */ | 436 | #endif /* WITH_AIXAUTHENTICATE */ |
435 | 437 | ||
436 | /* Get the name of the user that we wish to log in as. */ | 438 | /* Get the name of the user that we wish to log in as. */ |
@@ -501,7 +503,9 @@ do_authentication() | |||
501 | 503 | ||
502 | /* The user has been authenticated and accepted. */ | 504 | /* The user has been authenticated and accepted. */ |
503 | #ifdef WITH_AIXAUTHENTICATE | 505 | #ifdef WITH_AIXAUTHENTICATE |
504 | loginsuccess(user,get_canonical_hostname(),"ssh",&loginmsg); | 506 | /* We don't have a pty yet, so just label the line as "ssh" */ |
507 | if (loginsuccess(user,get_canonical_hostname(),"ssh",&aixloginmsg) < 0) | ||
508 | aixloginmsg = NULL; | ||
505 | #endif /* WITH_AIXAUTHENTICATE */ | 509 | #endif /* WITH_AIXAUTHENTICATE */ |
506 | packet_start(SSH_SMSG_SUCCESS); | 510 | packet_start(SSH_SMSG_SUCCESS); |
507 | packet_send(); | 511 | packet_send(); |