diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-02-12 15:52:57 +0000 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-02-12 15:52:57 +0000 |
commit | 1205fa68dfcd5da94d562df885b9808273e8b909 (patch) | |
tree | b753bf05c11bd5561806acc8e6262996a1be5519 /svr-runopts.c | |
parent | f5be0fb218a6dd1153678dd99e4ecbff306b8165 (diff) |
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 <paul.eggleton@linux.intel.com>
Diffstat (limited to 'svr-runopts.c')
-rw-r--r-- | svr-runopts.c | 5 |
1 files changed, 5 insertions, 0 deletions
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]); |