rcolebaugh / rpms / openssh

Forked from rpms/openssh 2 years ago
Clone

Blame SOURCES/openssh-6.6.1p1-partial-success.patch

017ff1
diff --git a/auth2.c b/auth2.c
017ff1
index d9b440a..ec0bf12 100644
017ff1
--- a/auth2.c
017ff1
+++ b/auth2.c
017ff1
@@ -355,8 +355,9 @@ userauth_finish(Authctxt *authctxt, int authenticated, const char *method,
017ff1
 		authctxt->success = 1;
017ff1
 	} else {
017ff1
 
017ff1
-		/* Allow initial try of "none" auth without failure penalty */
017ff1
-		if (!authctxt->server_caused_failure &&
017ff1
+		/* Allow initial try of "none" auth without failure penalty
017ff1
+		 * Partial succes is not failure */
017ff1
+		if (!authctxt->server_caused_failure && !partial &&
017ff1
 		    (authctxt->attempt > 1 || strcmp(method, "none") != 0))
017ff1
 			authctxt->failures++;
017ff1
 		if (authctxt->failures >= options.max_authtries) {