diff --git a/src/cli-runopts.c b/src/cli-runopts.c index 0ff7d93f..cc9ab158 100644 --- a/src/cli-runopts.c +++ b/src/cli-runopts.c @@ -888,29 +888,28 @@ static void add_extendedopt(const char* origstr) { if (strcmp(origstr, "help") == 0) { dropbear_log(LOG_INFO, "Available options:\n" + "\tBindAddress\n" + "\tDisableTrivialAuth\n" #if DROPBEAR_CLI_ANYTCPFWD "\tExitOnForwardFailure\n" #endif - "\tDisableTrivialAuth\n" + "\tPort\n" + "\tStrictHostKeyChecking\n" #ifndef DISABLE_SYSLOG "\tUseSyslog\n" #endif - "\tPort\n" - "\tStrictHostKeyChecking\n" ); exit(EXIT_SUCCESS); } -#if DROPBEAR_CLI_ANYTCPFWD - if (match_extendedopt(&optstr, "ExitOnForwardFailure") == DROPBEAR_SUCCESS) { - cli_opts.exit_on_fwd_failure = parse_flag_value(optstr); + if (match_extendedopt(&optstr, "DisableTrivialAuth") == DROPBEAR_SUCCESS) { + cli_opts.disable_trivial_auth = parse_flag_value(optstr); return; } -#endif -#ifndef DISABLE_SYSLOG - if (match_extendedopt(&optstr, "UseSyslog") == DROPBEAR_SUCCESS) { - opts.usingsyslog = parse_flag_value(optstr); +#if DROPBEAR_CLI_ANYTCPFWD + if (match_extendedopt(&optstr, "ExitOnForwardFailure") == DROPBEAR_SUCCESS) { + cli_opts.exit_on_fwd_failure = parse_flag_value(optstr); return; } #endif @@ -920,11 +919,6 @@ static void add_extendedopt(const char* origstr) { return; } - if (match_extendedopt(&optstr, "DisableTrivialAuth") == DROPBEAR_SUCCESS) { - cli_opts.disable_trivial_auth = parse_flag_value(optstr); - return; - } - if (match_extendedopt(&optstr, "StrictHostKeyChecking") == DROPBEAR_SUCCESS) { if (strcmp(optstr, "accept-new") == 0) { cli_opts.always_accept_key = 1; @@ -935,5 +929,12 @@ static void add_extendedopt(const char* origstr) { return; } +#ifndef DISABLE_SYSLOG + if (match_extendedopt(&optstr, "UseSyslog") == DROPBEAR_SUCCESS) { + opts.usingsyslog = parse_flag_value(optstr); + return; + } +#endif + dropbear_log(LOG_WARNING, "Ignoring unknown configuration option '%s'", origstr); }