diff options
author | Manfred Kaiser <37737811+manfred-kaiser@users.noreply.github.com> | 2021-08-19 17:37:14 +0200 |
---|---|---|
committer | Manfred Kaiser <37737811+manfred-kaiser@users.noreply.github.com> | 2021-08-19 17:37:14 +0200 |
commit | 48a32a68787367aaa5103a2e73cce9e5f3b3a610 (patch) | |
tree | 307d3f1027c541551f4ab2e3d3285e676ae73be7 /cli-runopts.c | |
parent | 675da103ab1e4ac25cd5b4b192c21dce55695fc6 (diff) | |
download | dropbear-48a32a68787367aaa5103a2e73cce9e5f3b3a610.tar.gz |
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); } |