version 1.122, 2010/08/31 09:58:37 |
version 1.123, 2011/03/10 02:52:57 |
|
|
#endif |
#endif |
|
|
authctxt->postponed = 0; |
authctxt->postponed = 0; |
|
authctxt->server_caused_failure = 0; |
|
|
/* try to authenticate user */ |
/* try to authenticate user */ |
m = authmethod_lookup(method); |
m = authmethod_lookup(method); |
|
|
authctxt->success = 1; |
authctxt->success = 1; |
} else { |
} else { |
/* Allow initial try of "none" auth without failure penalty */ |
/* Allow initial try of "none" auth without failure penalty */ |
if (authctxt->attempt > 1 || strcmp(method, "none") != 0) |
if (!authctxt->server_caused_failure && |
|
(authctxt->attempt > 1 || strcmp(method, "none") != 0)) |
authctxt->failures++; |
authctxt->failures++; |
if (authctxt->failures >= options.max_authtries) |
if (authctxt->failures >= options.max_authtries) |
packet_disconnect(AUTH_FAIL_MSG, authctxt->user); |
packet_disconnect(AUTH_FAIL_MSG, authctxt->user); |