Mercurial > dropbear
comparison cli-runopts.c @ 1821:df8d8ec1801c
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
author | Manfred Kaiser <37737811+manfred-kaiser@users.noreply.github.com> |
---|---|
date | Thu, 19 Aug 2021 17:37:14 +0200 |
parents | f8d8af12ac14 |
children | 94dc11094e26 |
comparison
equal
deleted
inserted
replaced
1820:e9854650d45b | 1821:df8d8ec1801c |
---|---|
150 cli_opts.privkeys = list_new(); | 150 cli_opts.privkeys = list_new(); |
151 #endif | 151 #endif |
152 #if DROPBEAR_CLI_ANYTCPFWD | 152 #if DROPBEAR_CLI_ANYTCPFWD |
153 cli_opts.exit_on_fwd_failure = 0; | 153 cli_opts.exit_on_fwd_failure = 0; |
154 #endif | 154 #endif |
155 cli_opts.disable_trivial_auth = 0; | |
155 #if DROPBEAR_CLI_LOCALTCPFWD | 156 #if DROPBEAR_CLI_LOCALTCPFWD |
156 cli_opts.localfwds = list_new(); | 157 cli_opts.localfwds = list_new(); |
157 opts.listen_fwd_all = 0; | 158 opts.listen_fwd_all = 0; |
158 #endif | 159 #endif |
159 #if DROPBEAR_CLI_REMOTETCPFWD | 160 #if DROPBEAR_CLI_REMOTETCPFWD |
887 if (strcmp(origstr, "help") == 0) { | 888 if (strcmp(origstr, "help") == 0) { |
888 dropbear_log(LOG_INFO, "Available options:\n" | 889 dropbear_log(LOG_INFO, "Available options:\n" |
889 #if DROPBEAR_CLI_ANYTCPFWD | 890 #if DROPBEAR_CLI_ANYTCPFWD |
890 "\tExitOnForwardFailure\n" | 891 "\tExitOnForwardFailure\n" |
891 #endif | 892 #endif |
893 "\tDisableTrivialAuth\n" | |
892 #ifndef DISABLE_SYSLOG | 894 #ifndef DISABLE_SYSLOG |
893 "\tUseSyslog\n" | 895 "\tUseSyslog\n" |
894 #endif | 896 #endif |
895 "\tPort\n" | 897 "\tPort\n" |
896 ); | 898 ); |
914 if (match_extendedopt(&optstr, "Port") == DROPBEAR_SUCCESS) { | 916 if (match_extendedopt(&optstr, "Port") == DROPBEAR_SUCCESS) { |
915 cli_opts.remoteport = optstr; | 917 cli_opts.remoteport = optstr; |
916 return; | 918 return; |
917 } | 919 } |
918 | 920 |
921 if (match_extendedopt(&optstr, "DisableTrivialAuth") == DROPBEAR_SUCCESS) { | |
922 cli_opts.disable_trivial_auth = parse_flag_value(optstr); | |
923 return; | |
924 } | |
925 | |
919 dropbear_log(LOG_WARNING, "Ignoring unknown configuration option '%s'", origstr); | 926 dropbear_log(LOG_WARNING, "Ignoring unknown configuration option '%s'", origstr); |
920 } | 927 } |