View | Details | Raw Unified | Return to bug 1244
Collapse All | Expand All

(-)auth.h (+1 lines)
Lines 53-58 Link Here
53
	int		 valid;		/* user exists and is allowed to login */
53
	int		 valid;		/* user exists and is allowed to login */
54
	int		 attempt;
54
	int		 attempt;
55
	int		 failures;
55
	int		 failures;
56
	int		 server_caused_failure; 
56
	int		 force_pwchange;
57
	int		 force_pwchange;
57
	char		*user;		/* username sent by the client */
58
	char		*user;		/* username sent by the client */
58
	char		*service;
59
	char		*service;
(-)auth2-gss.c (+2 lines)
Lines 102-107 Link Here
102
102
103
	if (!present) {
103
	if (!present) {
104
		xfree(doid);
104
		xfree(doid);
105
		authctxt->server_caused_failure = 1;
105
		return (0);
106
		return (0);
106
	}
107
	}
107
108
Lines 109-114 Link Here
109
		if (ctxt != NULL)
110
		if (ctxt != NULL)
110
			ssh_gssapi_delete_ctx(&ctxt);
111
			ssh_gssapi_delete_ctx(&ctxt);
111
		xfree(doid);
112
		xfree(doid);
113
		authctxt->server_caused_failure = 1;
112
		return (0);
114
		return (0);
113
	}
115
	}
114
116
(-)auth2.c (-1 / +4 lines)
Lines 199-204 Link Here
199
#endif
199
#endif
200
200
201
	authctxt->postponed = 0;
201
	authctxt->postponed = 0;
202
	authctxt->server_caused_failure = 0;
202
203
203
	/* try to authenticate user */
204
	/* try to authenticate user */
204
	m = authmethod_lookup(method);
205
	m = authmethod_lookup(method);
Lines 269-275 Link Here
269
		/* now we can break out */
270
		/* now we can break out */
270
		authctxt->success = 1;
271
		authctxt->success = 1;
271
	} else {
272
	} else {
272
		if (authctxt->failures++ > options.max_authtries) {
273
		/* Dont count server configuration issues against the client */
274
		if (!authctxt->server_caused_failure && 
275
		    authctxt->failures++ > options.max_authtries) {
273
#ifdef SSH_AUDIT_EVENTS
276
#ifdef SSH_AUDIT_EVENTS
274
			PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES));
277
			PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES));
275
#endif
278
#endif

Return to bug 1244