diff options
Diffstat (limited to 'auth2.c')
-rw-r--r-- | auth2.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -64,6 +64,7 @@ extern Authmethod method_passwd; | |||
64 | extern Authmethod method_kbdint; | 64 | extern Authmethod method_kbdint; |
65 | extern Authmethod method_hostbased; | 65 | extern Authmethod method_hostbased; |
66 | #ifdef GSSAPI | 66 | #ifdef GSSAPI |
67 | extern Authmethod method_gsskeyex; | ||
67 | extern Authmethod method_gssapi; | 68 | extern 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 |