summaryrefslogtreecommitdiff
path: root/auth2.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-05-17 22:00:02 +1000
committerDamien Miller <djm@mindrot.org>2000-05-17 22:00:02 +1000
commitd2c208a2d37104c5c429659ac708d6288400ecd2 (patch)
tree595741836a9444811c123b6555c1d47f5def2a95 /auth2.c
parent8d1fd57a971159c828ab778136ca6332f0ba8f34 (diff)
- Applied Tom Bertelson's <tbert@abac.com> AIX authentication fix
Diffstat (limited to 'auth2.c')
-rw-r--r--auth2.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/auth2.c b/auth2.c
index 3c15639d..46c8c1f8 100644
--- a/auth2.c
+++ b/auth2.c
@@ -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);