Commit b2c18706 authored by Federico G. Schwindt's avatar Federico G. Schwindt

Use "none" to disable authentication

Previously you needed an empty argument (''), which didn't play very
well along sysv init scripts and was not documented.
This should address both problems.

Fixes #2007.
parent a9df3e97
......@@ -720,9 +720,9 @@ main(int argc, char * const *argv)
if (b_arg != NULL && f_arg != NULL)
ARGV_ERR("Only one of -b or -f can be specified\n");
if (S_arg != NULL && *S_arg == '\0') {
if (S_arg != NULL && !strcmp(S_arg, "none")) {
fprintf(stderr,
"Warning: Empty -S argument, no CLI authentication.\n");
"Warning: CLI authentication disabled.\n");
} else if (S_arg != NULL) {
VJ_master(JAIL_MASTER_FILE);
o = open(S_arg, O_RDONLY, 0);
......@@ -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 (*S_arg != '\0')
if (strcmp(S_arg, "none"))
mgt_cli_secret(S_arg);
if (M_arg != NULL)
......
......@@ -123,11 +123,11 @@ OPTIONS
*vmod_path* read only as these can potentially be used to escalate
privileges from the CLI.
-S file
-S secret-file
Path to a file containing a secret used for authorizing access to
the management port. If not provided a new secret will be drawn
from the system PRNG.
from the system PRNG. To disable authentication use ``none``.
-s <[name=]type[,options]>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment