diff svr-auth.c @ 692:c58a15983808

Allow configuring "allow blank password option" at runtime Changes this from a compile-time switch to a command-line option. Signed-off-by: Paul Eggleton <[email protected]>
author Paul Eggleton <paul.eggleton@linux.intel.com>
date Tue, 12 Feb 2013 15:52:57 +0000
parents 6e0899b56ac4
children ac2158e3e403 e0084f136cb8
line wrap: on
line diff
--- a/svr-auth.c	Fri Feb 22 23:54:47 2013 +0800
+++ b/svr-auth.c	Tue Feb 12 15:52:57 2013 +0000
@@ -154,8 +154,8 @@
 			strncmp(methodname, AUTH_METHOD_NONE,
 				AUTH_METHOD_NONE_LEN) == 0) {
 		TRACE(("recv_msg_userauth_request: 'none' request"))
-#ifdef ALLOW_BLANK_PASSWORD
-		if (!svr_opts.noauthpass 
+		if (svr_opts.allowblankpass
+				&& !svr_opts.noauthpass
 				&& !(svr_opts.norootpass && ses.authstate.pw_uid == 0) 
 				&& ses.authstate.pw_passwd[0] == '\0') 
 		{
@@ -167,7 +167,6 @@
 			goto out;
 		}
 		else
-#endif
 		{
 			send_msg_userauth_failure(0, 0);
 			goto out;