vishalmishra434 / rpms / openssh

Forked from rpms/openssh a month ago
Clone
cvsdist ffdec5
Skip the initial empty-password check if permit_empty_passwd is disabled.  This
cvsdist ffdec5
doesn't change the timing profiles of the host because the additional condition
cvsdist ffdec5
check which can short-circuit the call to pam_authenticate() has no dependency
cvsdist ffdec5
on the identity of the user who is being authenticated.
cvsdist ffdec5
--- openssh-3.8p1/auth1.c	2004-02-26 21:05:25.000000000 -0500
cvsdist ffdec5
+++ openssh-3.8p1/auth1.c	2004-02-26 21:05:20.000000000 -0500
cvsdist ffdec5
@@ -76,7 +76,7 @@
cvsdist ffdec5
 	    authctxt->valid ? "" : "illegal user ", authctxt->user);
cvsdist ffdec5
 
cvsdist ffdec5
 	/* If the user has no password, accept authentication immediately. */
cvsdist ffdec5
-	if (options.password_authentication &&
cvsdist ffdec5
+	if (options.permit_empty_passwd && options.password_authentication &&
cvsdist ffdec5
 #ifdef KRB5
cvsdist ffdec5
 	    (!options.kerberos_authentication || options.kerberos_or_local_passwd) &&
cvsdist ffdec5
 #endif
cvsdist ffdec5
--- openssh-3.8p1/auth2-none.c	2004-02-26 21:07:34.000000000 -0500
cvsdist ffdec5
+++ openssh-3.8p1/auth2-none.c	2004-02-26 21:07:28.000000000 -0500
cvsdist ffdec5
@@ -100,7 +100,7 @@
cvsdist ffdec5
 	if (check_nt_auth(1, authctxt->pw) == 0)
cvsdist ffdec5
 		return(0);
cvsdist ffdec5
 #endif
cvsdist ffdec5
-	if (options.password_authentication)
cvsdist ffdec5
+	if (options.permit_empty_passwd && options.password_authentication)
cvsdist ffdec5
 		return (PRIVSEP(auth_password(authctxt, "")));
cvsdist ffdec5
 	return (0);
cvsdist ffdec5
 }