diff options
Diffstat (limited to 'auth-passwd.c')
-rw-r--r-- | auth-passwd.c | 45 |
1 files changed, 5 insertions, 40 deletions
diff --git a/auth-passwd.c b/auth-passwd.c index 54571f972..a27170ccc 100644 --- a/auth-passwd.c +++ b/auth-passwd.c | |||
@@ -43,9 +43,7 @@ RCSID("$OpenBSD: auth-passwd.c,v 1.30 2003/11/04 08:54:09 djm Exp $"); | |||
43 | #include "servconf.h" | 43 | #include "servconf.h" |
44 | #include "auth.h" | 44 | #include "auth.h" |
45 | #ifdef WITH_AIXAUTHENTICATE | 45 | #ifdef WITH_AIXAUTHENTICATE |
46 | # include "buffer.h" | ||
47 | # include "canohost.h" | 46 | # include "canohost.h" |
48 | extern Buffer loginmsg; | ||
49 | #endif | 47 | #endif |
50 | 48 | ||
51 | extern ServerOptions options; | 49 | extern ServerOptions options; |
@@ -89,44 +87,11 @@ auth_password(Authctxt *authctxt, const char *password) | |||
89 | } | 87 | } |
90 | # endif | 88 | # endif |
91 | # ifdef WITH_AIXAUTHENTICATE | 89 | # ifdef WITH_AIXAUTHENTICATE |
92 | { | 90 | if (aix_authenticate(pw->pw_name, password, |
93 | char *authmsg = NULL; | 91 | get_canonical_hostname(options.use_dns)) == 0) |
94 | int reenter = 1; | 92 | return 0; |
95 | int authsuccess = 0; | 93 | else |
96 | 94 | return ok; | |
97 | if (authenticate(pw->pw_name, password, &reenter, | ||
98 | &authmsg) == 0 && ok) { | ||
99 | char *msg; | ||
100 | char *host = | ||
101 | (char *)get_canonical_hostname(options.use_dns); | ||
102 | |||
103 | authsuccess = 1; | ||
104 | aix_remove_embedded_newlines(authmsg); | ||
105 | |||
106 | debug3("AIX/authenticate succeeded for user %s: %.100s", | ||
107 | pw->pw_name, authmsg); | ||
108 | |||
109 | /* No pty yet, so just label the line as "ssh" */ | ||
110 | aix_setauthdb(authctxt->user); | ||
111 | if (loginsuccess(authctxt->user, host, "ssh", | ||
112 | &msg) == 0) { | ||
113 | if (msg != NULL) { | ||
114 | debug("%s: msg %s", __func__, msg); | ||
115 | buffer_append(&loginmsg, msg, | ||
116 | strlen(msg)); | ||
117 | xfree(msg); | ||
118 | } | ||
119 | } | ||
120 | } else { | ||
121 | debug3("AIX/authenticate failed for user %s: %.100s", | ||
122 | pw->pw_name, authmsg); | ||
123 | } | ||
124 | |||
125 | if (authmsg != NULL) | ||
126 | xfree(authmsg); | ||
127 | |||
128 | return authsuccess; | ||
129 | } | ||
130 | # endif | 95 | # endif |
131 | # ifdef BSD_AUTH | 96 | # ifdef BSD_AUTH |
132 | if (auth_userokay(pw->pw_name, authctxt->style, "auth-ssh", | 97 | if (auth_userokay(pw->pw_name, authctxt->style, "auth-ssh", |