diff options
author | Manfred Kaiser <37737811+manfred-kaiser@users.noreply.github.com> | 2021-08-19 17:37:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-19 23:37:14 +0800 |
commit | 210a9833496ed2a93b8da93924874938127ce0b5 (patch) | |
tree | b7bbba8079879cc3bc057a2eba8433f0e0ae4094 /cli-runopts.c | |
parent | 69e5709f75981bf0f5147c5f1d95a0f4fdf11b6f (diff) |
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
Diffstat (limited to 'cli-runopts.c')
-rw-r--r-- | cli-runopts.c | 7 |
1 files changed, 7 insertions, 0 deletions
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); } |