[4.1] 26252af Correct behavior when S_arg is the empty string
PÃ¥l Hermunn Johansen
hermunn at varnish-software.com
Tue Sep 13 13:43:11 CEST 2016
commit 26252af4e3af58be94afd8e2bbfbb808fee1740e
Author: Pål Hermunn Johansen <hermunn at varnish-software.com>
Date: Tue Sep 13 13:39:17 2016 +0200
Correct behavior when S_arg is the empty string
A previous backport, "Use "none" to disable authentication" did not
skip mgt_cli_secret(S_arg) when -S '' was used. This fixes the
problem, so that -S '' has the same behavior as before.
diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index ae4ce15..611695f 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -822,7 +822,7 @@ main(int argc, char * const *argv)
if (d_flag)
mgt_cli_setup(0, 1, 1, "debug", cli_stdin_close, NULL);
- if (strcmp(S_arg, "none"))
+ if (strcmp(S_arg, "none") && *S_arg != '\0')
mgt_cli_secret(S_arg);
if (M_arg != NULL)
More information about the varnish-commit
mailing list