|
Lines 162-168
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 |
authenticated = -1; /* signal illegal user */ |
| 166 |
#endif |
167 |
#endif |
| 167 |
} |
168 |
} |
| 168 |
setproctitle("%s%s", authctxt->pw ? user : "unknown", |
169 |
setproctitle("%s%s", authctxt->pw ? user : "unknown", |
|
Lines 185-193
Link Here
|
| 185 |
/* try to authenticate user */ |
186 |
/* try to authenticate user */ |
| 186 |
m = authmethod_lookup(method); |
187 |
m = authmethod_lookup(method); |
| 187 |
if (m != NULL) { |
188 |
if (m != NULL) { |
|
|
189 |
int r; |
| 190 |
|
| 188 |
debug2("input_userauth_request: try method %s", method); |
191 |
debug2("input_userauth_request: try method %s", method); |
| 189 |
authenticated = m->userauth(authctxt); |
192 |
r = m->userauth(authctxt); |
| 190 |
} |
193 |
authenticated = authenticated != -1 ? r : 0; |
|
|
194 |
} else |
| 195 |
authenticated = 0; |
| 196 |
|
| 191 |
userauth_finish(authctxt, authenticated, method); |
197 |
userauth_finish(authctxt, authenticated, method); |
| 192 |
|
198 |
|
| 193 |
xfree(service); |
199 |
xfree(service); |
|
Lines 223-229
Link Here
|
| 223 |
#endif /* _UNICOS */ |
229 |
#endif /* _UNICOS */ |
| 224 |
|
230 |
|
| 225 |
/* Log before sending the reply */ |
231 |
/* Log before sending the reply */ |
| 226 |
auth_log(authctxt, authenticated, method, " ssh2"); |
232 |
/* |
|
|
233 |
* With an exception: don't log 'none' failures if empty passwords |
| 234 |
* are not allowed; the openssh client ALWAYS requests none just |
| 235 |
* to get the list of auth methods, so this is too noisy. |
| 236 |
*/ |
| 237 |
if (!(!strcmp(method, "none") && /* method 'none' */ |
| 238 |
!options.permit_empty_passwd && /* none !allowed */ |
| 239 |
!authenticated)) /* failed auth */ |
| 240 |
auth_log(authctxt, authenticated, method, " ssh2"); |
| 227 |
|
241 |
|
| 228 |
if (authctxt->postponed) |
242 |
if (authctxt->postponed) |
| 229 |
return; |
243 |
return; |