diff options
Diffstat (limited to 'auth2.c')
-rw-r--r-- | auth2.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -69,6 +69,7 @@ extern Authmethod method_passwd; | |||
69 | extern Authmethod method_kbdint; | 69 | extern Authmethod method_kbdint; |
70 | extern Authmethod method_hostbased; | 70 | extern Authmethod method_hostbased; |
71 | #ifdef GSSAPI | 71 | #ifdef GSSAPI |
72 | extern Authmethod method_gsskeyex; | ||
72 | extern Authmethod method_gssapi; | 73 | extern Authmethod method_gssapi; |
73 | #endif | 74 | #endif |
74 | #ifdef JPAKE | 75 | #ifdef JPAKE |
@@ -79,6 +80,7 @@ Authmethod *authmethods[] = { | |||
79 | &method_none, | 80 | &method_none, |
80 | &method_pubkey, | 81 | &method_pubkey, |
81 | #ifdef GSSAPI | 82 | #ifdef GSSAPI |
83 | &method_gsskeyex, | ||
82 | &method_gssapi, | 84 | &method_gssapi, |
83 | #endif | 85 | #endif |
84 | #ifdef JPAKE | 86 | #ifdef JPAKE |
@@ -274,6 +276,7 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt) | |||
274 | #endif | 276 | #endif |
275 | 277 | ||
276 | authctxt->postponed = 0; | 278 | authctxt->postponed = 0; |
279 | authctxt->server_caused_failure = 0; | ||
277 | 280 | ||
278 | /* try to authenticate user */ | 281 | /* try to authenticate user */ |
279 | m = authmethod_lookup(method); | 282 | m = authmethod_lookup(method); |
@@ -346,7 +349,8 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method) | |||
346 | } else { | 349 | } else { |
347 | 350 | ||
348 | /* Allow initial try of "none" auth without failure penalty */ | 351 | /* Allow initial try of "none" auth without failure penalty */ |
349 | if (authctxt->attempt > 1 || strcmp(method, "none") != 0) | 352 | if (!authctxt->server_caused_failure && |
353 | (authctxt->attempt > 1 || strcmp(method, "none") != 0)) | ||
350 | authctxt->failures++; | 354 | authctxt->failures++; |
351 | if (authctxt->failures >= options.max_authtries) { | 355 | if (authctxt->failures >= options.max_authtries) { |
352 | #ifdef SSH_AUDIT_EVENTS | 356 | #ifdef SSH_AUDIT_EVENTS |