From 48a32a68787367aaa5103a2e73cce9e5f3b3a610 Mon Sep 17 00:00:00 2001 From: Manfred Kaiser <37737811+manfred-kaiser@users.noreply.github.com> Date: Thu, 19 Aug 2021 17:37:14 +0200 Subject: added option to disable trivial auth methods (#128) * added option to disable trivial auth methods * rename argument to match with other ssh clients * fixed trivial auth detection for pubkeys --- cli-runopts.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cli-runopts.c') diff --git a/cli-runopts.c b/cli-runopts.c index 3654b9a..255b47e 100644 --- a/cli-runopts.c +++ b/cli-runopts.c @@ -152,6 +152,7 @@ void cli_getopts(int argc, char ** argv) { #if DROPBEAR_CLI_ANYTCPFWD cli_opts.exit_on_fwd_failure = 0; #endif + cli_opts.disable_trivial_auth = 0; #if DROPBEAR_CLI_LOCALTCPFWD cli_opts.localfwds = list_new(); opts.listen_fwd_all = 0; @@ -889,6 +890,7 @@ static void add_extendedopt(const char* origstr) { #if DROPBEAR_CLI_ANYTCPFWD "\tExitOnForwardFailure\n" #endif + "\tDisableTrivialAuth\n" #ifndef DISABLE_SYSLOG "\tUseSyslog\n" #endif @@ -916,5 +918,10 @@ 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; + } + dropbear_log(LOG_WARNING, "Ignoring unknown configuration option '%s'", origstr); } -- cgit v1.2.1