Mercurial > dropbear
comparison cli-runopts.c @ 1733:d529a52b2f7c coverity coverity
merge coverity from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 26 Jun 2020 21:07:34 +0800 |
parents | f8d8af12ac14 |
children | df8d8ec1801c |
comparison
equal
deleted
inserted
replaced
1643:b59623a64678 | 1733:d529a52b2f7c |
---|---|
212 cli_opts.no_hostkey_check = 1; | 212 cli_opts.no_hostkey_check = 1; |
213 } | 213 } |
214 cli_opts.always_accept_key = 1; | 214 cli_opts.always_accept_key = 1; |
215 break; | 215 break; |
216 case 'p': /* remoteport */ | 216 case 'p': /* remoteport */ |
217 next = &cli_opts.remoteport; | 217 next = (char**)&cli_opts.remoteport; |
218 break; | 218 break; |
219 #if DROPBEAR_CLI_PUBKEY_AUTH | 219 #if DROPBEAR_CLI_PUBKEY_AUTH |
220 case 'i': /* an identityfile */ | 220 case 'i': /* an identityfile */ |
221 opt = OPT_AUTHKEY; | 221 opt = OPT_AUTHKEY; |
222 break; | 222 break; |
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); |