diff options
Diffstat (limited to 'auth2.c')
-rw-r--r-- | auth2.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -55,6 +55,7 @@ extern Authmethod method_passwd; | |||
55 | extern Authmethod method_kbdint; | 55 | extern Authmethod method_kbdint; |
56 | extern Authmethod method_hostbased; | 56 | extern Authmethod method_hostbased; |
57 | #ifdef GSSAPI | 57 | #ifdef GSSAPI |
58 | extern Authmethod method_gsskeyex; | ||
58 | extern Authmethod method_gssapi; | 59 | extern Authmethod method_gssapi; |
59 | #endif | 60 | #endif |
60 | 61 | ||
@@ -62,6 +63,7 @@ Authmethod *authmethods[] = { | |||
62 | &method_none, | 63 | &method_none, |
63 | &method_pubkey, | 64 | &method_pubkey, |
64 | #ifdef GSSAPI | 65 | #ifdef GSSAPI |
66 | &method_gsskeyex, | ||
65 | &method_gssapi, | 67 | &method_gssapi, |
66 | #endif | 68 | #endif |
67 | &method_passwd, | 69 | &method_passwd, |
@@ -192,6 +194,7 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt) | |||
192 | #endif | 194 | #endif |
193 | 195 | ||
194 | authctxt->postponed = 0; | 196 | authctxt->postponed = 0; |
197 | authctxt->server_caused_failure = 0; | ||
195 | 198 | ||
196 | /* try to authenticate user */ | 199 | /* try to authenticate user */ |
197 | m = authmethod_lookup(method); | 200 | m = authmethod_lookup(method); |
@@ -262,7 +265,9 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method) | |||
262 | /* now we can break out */ | 265 | /* now we can break out */ |
263 | authctxt->success = 1; | 266 | authctxt->success = 1; |
264 | } else { | 267 | } else { |
265 | if (authctxt->failures++ > options.max_authtries) { | 268 | /* Dont count server configuration issues against the client */ |
269 | if (!authctxt->server_caused_failure && | ||
270 | authctxt->failures++ > options.max_authtries) { | ||
266 | #ifdef SSH_AUDIT_EVENTS | 271 | #ifdef SSH_AUDIT_EVENTS |
267 | PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES)); | 272 | PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES)); |
268 | #endif | 273 | #endif |