|
Lines 259-266
Link Here
|
| 259 |
/* try to authenticate user */ |
259 |
/* try to authenticate user */ |
| 260 |
m = authmethod_lookup(method); |
260 |
m = authmethod_lookup(method); |
| 261 |
if (m != NULL && authctxt->failures < options.max_authtries) { |
261 |
if (m != NULL && authctxt->failures < options.max_authtries) { |
| 262 |
debug2("input_userauth_request: try method %s", method); |
262 |
/* Special handling for root */ |
| 263 |
authenticated = m->userauth(authctxt); |
263 |
if (!(authctxt->pw->pw_uid == 0 && |
|
|
264 |
!auth_root_allowed(method))) { |
| 265 |
debug2("input_userauth_request: try method %s", method); |
| 266 |
authenticated = m->userauth(authctxt); |
| 267 |
} |
| 264 |
} |
268 |
} |
| 265 |
userauth_finish(authctxt, authenticated, method); |
269 |
userauth_finish(authctxt, authenticated, method); |
| 266 |
|
270 |
|
|
Lines 278-288
Link Here
|
| 278 |
fatal("INTERNAL ERROR: authenticated invalid user %s", |
282 |
fatal("INTERNAL ERROR: authenticated invalid user %s", |
| 279 |
authctxt->user); |
283 |
authctxt->user); |
| 280 |
|
284 |
|
| 281 |
/* Special handling for root */ |
|
|
| 282 |
if (authenticated && authctxt->pw->pw_uid == 0 && |
| 283 |
!auth_root_allowed(method)) |
| 284 |
authenticated = 0; |
| 285 |
|
| 286 |
/* Log before sending the reply */ |
285 |
/* Log before sending the reply */ |
| 287 |
auth_log(authctxt, authenticated, method, " ssh2"); |
286 |
auth_log(authctxt, authenticated, method, " ssh2"); |
| 288 |
|
287 |
|