comparison cli-runopts.c @ 1687:f8d8af12ac14

Make "dbclient -m help -c help" work
author Matt Johnston <matt@ucc.asn.au>
date Tue, 26 May 2020 20:15:39 +0800
parents 21dabe66f2c8
children df8d8ec1801c
comparison
equal deleted inserted replaced
1686:83d48276885b 1687:f8d8af12ac14
376 dropbear_exit("Invalid null argument"); 376 dropbear_exit("Invalid null argument");
377 next = NULL; 377 next = NULL;
378 } 378 }
379 } 379 }
380 380
381 #if DROPBEAR_USER_ALGO_LIST
382 /* -c help doesn't need a hostname */
383 parse_ciphers_macs();
384 #endif
385
381 /* Done with options/flags; now handle the hostname (which may not 386 /* Done with options/flags; now handle the hostname (which may not
382 * start with a hyphen) and optional command */ 387 * start with a hyphen) and optional command */
383 388
384 if (host_arg == NULL) { /* missing hostname */ 389 if (host_arg == NULL) { /* missing hostname */
385 printhelp(); 390 printhelp();
405 /* It'll be null-terminated here */ 410 /* It'll be null-terminated here */
406 TRACE(("cmd is: %s", cli_opts.cmd)) 411 TRACE(("cmd is: %s", cli_opts.cmd))
407 } 412 }
408 413
409 /* And now a few sanity checks and setup */ 414 /* And now a few sanity checks and setup */
410
411 #if DROPBEAR_USER_ALGO_LIST
412 parse_ciphers_macs();
413 #endif
414 415
415 #if DROPBEAR_CLI_PROXYCMD 416 #if DROPBEAR_CLI_PROXYCMD
416 if (cli_opts.proxycmd) { 417 if (cli_opts.proxycmd) {
417 /* To match the common path of m_freeing it */ 418 /* To match the common path of m_freeing it */
418 cli_opts.proxycmd = m_strdup(cli_opts.proxycmd); 419 cli_opts.proxycmd = m_strdup(cli_opts.proxycmd);