summaryrefslogtreecommitdiff
path: root/svr-auth.c
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-02-12 15:52:57 +0000
committerPaul Eggleton <paul.eggleton@linux.intel.com>2013-02-12 15:52:57 +0000
commit533e25774afe3e752f9d9809e0af22c15b3ca487 (patch)
treeac32d0fc80268a9d7945deffd6122f9f9639d205 /svr-auth.c
parent6542ebbc5196bd90482add8109ea70a48cac451e (diff)
downloaddropbear-533e25774afe3e752f9d9809e0af22c15b3ca487.tar.gz
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-auth.c')
-rw-r--r--svr-auth.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/svr-auth.c b/svr-auth.c
index ee2b89f..404232e 100644
--- a/svr-auth.c
+++ b/svr-auth.c
@@ -154,8 +154,8 @@ void recv_msg_userauth_request() {
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 @@ void recv_msg_userauth_request() {
goto out;
}
else
-#endif
{
send_msg_userauth_failure(0, 0);
goto out;