|
Lines 162-168
input_userauth_request(int type, u_int32
Link Here
|
| 162 |
} else { |
162 |
} else { |
| 163 |
log("input_userauth_request: illegal user %s", user); |
163 |
log("input_userauth_request: illegal user %s", user); |
| 164 |
#ifdef USE_PAM |
164 |
#ifdef USE_PAM |
| 165 |
PRIVSEP(start_pam("NOUSER")); |
165 |
PRIVSEP(start_pam(user)); |
| 166 |
#endif |
166 |
#endif |
| 167 |
} |
167 |
} |
| 168 |
setproctitle("%s%s", authctxt->pw ? user : "unknown", |
168 |
setproctitle("%s%s", authctxt->pw ? user : "unknown", |
|
Lines 186-193
input_userauth_request(int type, u_int32
Link Here
|
| 186 |
m = authmethod_lookup(method); |
186 |
m = authmethod_lookup(method); |
| 187 |
if (m != NULL) { |
187 |
if (m != NULL) { |
| 188 |
debug2("input_userauth_request: try method %s", method); |
188 |
debug2("input_userauth_request: try method %s", method); |
| 189 |
authenticated = m->userauth(authctxt); |
189 |
authenticated = m->userauth(authctxt) && authctxt->valid; |
| 190 |
} |
190 |
} |
| 191 |
userauth_finish(authctxt, authenticated, method); |
191 |
userauth_finish(authctxt, authenticated, method); |
| 192 |
|
192 |
|
| 193 |
xfree(service); |
193 |
xfree(service); |
|
Lines 223-229
userauth_finish(Authctxt *authctxt, int
Link Here
|
| 223 |
#endif /* _UNICOS */ |
223 |
#endif /* _UNICOS */ |
| 224 |
|
224 |
|
| 225 |
/* Log before sending the reply */ |
225 |
/* Log before sending the reply */ |
| 226 |
auth_log(authctxt, authenticated, method, " ssh2"); |
226 |
/* |
|
|
227 |
* With an exception: don't log 'none' failures if empty passwords |
| 228 |
* are not allowed; the openssh client ALWAYS requests none just |
| 229 |
* to get the list of auth methods, so this is too noisy. |
| 230 |
*/ |
| 231 |
if (!(!strcmp(method, "none") && /* method 'none' */ |
| 232 |
!options.permit_empty_passwd && /* none !allowed */ |
| 233 |
!authenticated)) /* failed auth */ |
| 234 |
auth_log(authctxt, authenticated, method, " ssh2"); |
| 227 |
|
235 |
|
| 228 |
if (authctxt->postponed) |
236 |
if (authctxt->postponed) |
| 229 |
return; |
237 |
return; |