summaryrefslogtreecommitdiff
path: root/auth2.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth2.c')
-rw-r--r--auth2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/auth2.c b/auth2.c
index f12440815..a67449db5 100644
--- a/auth2.c
+++ b/auth2.c
@@ -196,6 +196,7 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
196#endif 196#endif
197 197
198 authctxt->postponed = 0; 198 authctxt->postponed = 0;
199 authctxt->server_caused_failure = 0;
199 200
200 /* try to authenticate user */ 201 /* try to authenticate user */
201 m = authmethod_lookup(method); 202 m = authmethod_lookup(method);
@@ -266,7 +267,9 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method)
266 /* now we can break out */ 267 /* now we can break out */
267 authctxt->success = 1; 268 authctxt->success = 1;
268 } else { 269 } else {
269 if (authctxt->failures++ > options.max_authtries) { 270 /* Dont count server configuration issues against the client */
271 if (!authctxt->server_caused_failure &&
272 authctxt->failures++ > options.max_authtries) {
270#ifdef SSH_AUDIT_EVENTS 273#ifdef SSH_AUDIT_EVENTS
271 PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES)); 274 PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES));
272#endif 275#endif