diff options
author | Damien Miller <djm@mindrot.org> | 2000-05-17 22:00:02 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-05-17 22:00:02 +1000 |
commit | d2c208a2d37104c5c429659ac708d6288400ecd2 (patch) | |
tree | 595741836a9444811c123b6555c1d47f5def2a95 /auth2.c | |
parent | 8d1fd57a971159c828ab778136ca6332f0ba8f34 (diff) | |
download | openssh-git-d2c208a2d37104c5c429659ac708d6288400ecd2.tar.gz |
- Applied Tom Bertelson's <tbert@abac.com> AIX authentication fix
Diffstat (limited to 'auth2.c')
-rw-r--r-- | auth2.c | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -154,9 +154,9 @@ input_userauth_request(int type, int plen) int authenticated = 0; char *raw, *user, *service, *method, *authmsg = NULL; struct passwd *pw; - - if (++attempt == AUTH_FAIL_MAX) - packet_disconnect("too many failed userauth_requests"); +#ifdef WITH_AIXAUTHENTICATE + extern char *aixloginmsg; +#endif /* WITH_AIXAUTHENTICATE */ raw = packet_get_raw(&rlen); if (plen != rlen) @@ -164,6 +164,12 @@ input_userauth_request(int type, int plen) user = packet_get_string(&len); service = packet_get_string(&len); method = packet_get_string(&len); + if (++attempt == AUTH_FAIL_MAX) { +#ifdef WITH_AIXAUTHENTICATE + loginfailed(user,get_canonical_hostname(),"ssh"); +#endif /* WITH_AIXAUTHENTICATE */ + packet_disconnect("too many failed userauth_requests"); + } debug("userauth-request for user %s service %s method %s", user, service, method); /* XXX we only allow the ssh-connection service */ @@ -211,6 +217,12 @@ input_userauth_request(int type, int plen) /* XXX todo: check if multiple auth methods are needed */ if (authenticated == 1) { +#ifdef WITH_AIXAUTHENTICATE + /* We don't have a pty yet, so just label the line as "ssh" */ + if (loginsuccess(user,get_canonical_hostname(),"ssh", + &aixloginmsg) < 0) + aixloginmsg = NULL; +#endif /* WITH_AIXAUTHENTICATE */ /* turn off userauth */ dispatch_set(SSH2_MSG_USERAUTH_REQUEST, &protocol_error); packet_start(SSH2_MSG_USERAUTH_SUCCESS); |