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