diff svr-runopts.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 675bbd630f5d
children 002cf09827c0
line wrap: on
line diff
--- a/svr-runopts.c	Fri Feb 22 23:54:47 2013 +0800
+++ b/svr-runopts.c	Tue Feb 12 15:52:57 2013 +0000
@@ -63,6 +63,7 @@
 #if defined(ENABLE_SVR_PASSWORD_AUTH) || defined(ENABLE_SVR_PAM_AUTH)
 					"-s		Disable password logins\n"
 					"-g		Disable password logins for root\n"
+					"-B		Allow blank password logins\n"
 #endif
 #ifdef ENABLE_SVR_LOCALTCPFWD
 					"-j		Disable local port forwarding\n"
@@ -115,6 +116,7 @@
 	svr_opts.norootlogin = 0;
 	svr_opts.noauthpass = 0;
 	svr_opts.norootpass = 0;
+	svr_opts.allowblankpass = 0;
 	svr_opts.inetdmode = 0;
 	svr_opts.portcount = 0;
 	svr_opts.hostkey = NULL;
@@ -234,6 +236,9 @@
 				case 'g':
 					svr_opts.norootpass = 1;
 					break;
+				case 'B':
+					svr_opts.allowblankpass = 1;
+					break;
 #endif
 				case 'h':
 					printhelp(argv[0]);