summaryrefslogtreecommitdiff
path: root/auth2.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth2.c')
-rw-r--r--auth2.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/auth2.c b/auth2.c
index b1a4e3635..3009e291e 100644
--- a/auth2.c
+++ b/auth2.c
@@ -64,6 +64,7 @@ extern Authmethod method_passwd;
64extern Authmethod method_kbdint; 64extern Authmethod method_kbdint;
65extern Authmethod method_hostbased; 65extern Authmethod method_hostbased;
66#ifdef GSSAPI 66#ifdef GSSAPI
67extern Authmethod method_gsskeyex;
67extern Authmethod method_gssapi; 68extern Authmethod method_gssapi;
68#endif 69#endif
69 70
@@ -71,6 +72,7 @@ Authmethod *authmethods[] = {
71 &method_none, 72 &method_none,
72 &method_pubkey, 73 &method_pubkey,
73#ifdef GSSAPI 74#ifdef GSSAPI
75 &method_gsskeyex,
74 &method_gssapi, 76 &method_gssapi,
75#endif 77#endif
76 &method_passwd, 78 &method_passwd,
@@ -195,6 +197,7 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
195#endif 197#endif
196 198
197 authctxt->postponed = 0; 199 authctxt->postponed = 0;
200 authctxt->server_caused_failure = 0;
198 201
199 /* try to authenticate user */ 202 /* try to authenticate user */
200 m = authmethod_lookup(method); 203 m = authmethod_lookup(method);
@@ -265,7 +268,9 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method)
265 /* now we can break out */ 268 /* now we can break out */
266 authctxt->success = 1; 269 authctxt->success = 1;
267 } else { 270 } else {
268 if (authctxt->failures++ > options.max_authtries) { 271 /* Dont count server configuration issues against the client */
272 if (!authctxt->server_caused_failure &&
273 authctxt->failures++ > options.max_authtries) {
269#ifdef SSH_AUDIT_EVENTS 274#ifdef SSH_AUDIT_EVENTS
270 PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES)); 275 PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES));
271#endif 276#endif