From 1205fa68dfcd5da94d562df885b9808273e8b909 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 12 Feb 2013 15:52:57 +0000 Subject: 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 --- svr-runopts.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'svr-runopts.c') diff --git a/svr-runopts.c b/svr-runopts.c index 2e5edc5..1cd39ff 100644 --- a/svr-runopts.c +++ b/svr-runopts.c @@ -63,6 +63,7 @@ static void printhelp(const char * progname) { #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 @@ void svr_getopts(int argc, char ** argv) { 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 @@ void svr_getopts(int argc, char ** argv) { case 'g': svr_opts.norootpass = 1; break; + case 'B': + svr_opts.allowblankpass = 1; + break; #endif case 'h': printhelp(argv[0]); -- cgit v1.2.3