Skip to content

Commit

Permalink
Fix dbclient -m help and -c help w/out hostname.
Browse files Browse the repository at this point in the history
Commit 12ab8ff added a check requiring a hostname, but it's before
the ciphers and macs are checked.  This breaks "dbclient -m help"
unless a hostname is also provided.
  • Loading branch information
daztucker committed Jun 19, 2024
1 parent b5c4a65 commit a2c8242
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/cli-runopts.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,11 @@ void cli_getopts(int argc, char ** argv) {
}
}

#if DROPBEAR_USER_ALGO_LIST
/* -c help doesn't need a hostname */
parse_ciphers_macs();
#endif

if (host_arg == NULL) { /* missing hostname */
printhelp();
dropbear_exit("Remote host needs to provided.");
Expand All @@ -424,11 +429,6 @@ void cli_getopts(int argc, char ** argv) {
cli_opts.username = m_strdup(cli_opts.own_user);
}

#if DROPBEAR_USER_ALGO_LIST
/* -c help doesn't need a hostname */
parse_ciphers_macs();
#endif

/* Done with options/flags; now handle the hostname (which may not
* start with a hyphen) and optional command */

Expand Down

0 comments on commit a2c8242

Please sign in to comment.