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, |
@@ -188,6 +190,7 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt) | |||
188 | #endif | 190 | #endif |
189 | 191 | ||
190 | authctxt->postponed = 0; | 192 | authctxt->postponed = 0; |
193 | authctxt->server_caused_failure = 0; | ||
191 | 194 | ||
192 | /* try to authenticate user */ | 195 | /* try to authenticate user */ |
193 | m = authmethod_lookup(method); | 196 | m = authmethod_lookup(method); |
@@ -258,7 +261,9 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method) | |||
258 | /* now we can break out */ | 261 | /* now we can break out */ |
259 | authctxt->success = 1; | 262 | authctxt->success = 1; |
260 | } else { | 263 | } else { |
261 | if (authctxt->failures++ > options.max_authtries) { | 264 | /* Dont count server configuration issues against the client */ |
265 | if (!authctxt->server_caused_failure && | ||
266 | authctxt->failures++ > options.max_authtries) { | ||
262 | #ifdef SSH_AUDIT_EVENTS | 267 | #ifdef SSH_AUDIT_EVENTS |
263 | PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES)); | 268 | PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES)); |
264 | #endif | 269 | #endif |