From ed34c3de14fbaed36ce3243668b28af411dfb085 Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Wed, 19 Jun 2019 14:15:34 +0200 Subject: [PATCH] sshdump: fix bug in --remote-sudo. Fix documentation as well. Bug: 15845 Change-Id: I1b4e50c21887afa6a60b76de6cc169a1d0b5067a Reviewed-on: https://code.wireshark.org/review/33658 Petri-Dish: Dario Lombardo Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- doc/sshdump.pod | 1 + extcap/sshdump.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/sshdump.pod b/doc/sshdump.pod index c15ccf87dc..b60e458efd 100644 --- a/doc/sshdump.pod +++ b/doc/sshdump.pod @@ -27,6 +27,7 @@ S<[ B<--remote-password>=EpasswordE ]> S<[ B<--sshkey>=Epublic key path ]> S<[ B<--remote-interface>=EinterfaceE ]> S<[ B<--remote-capture-command>=Ecapture commandE ]> +S<[ B<--remote-sudo> ]> B S> diff --git a/extcap/sshdump.c b/extcap/sshdump.c index 7f91ff231a..84326c1ee2 100644 --- a/extcap/sshdump.c +++ b/extcap/sshdump.c @@ -59,7 +59,7 @@ static struct option longopts[] = { { "version", no_argument, NULL, OPT_VERSION}, SSH_BASE_OPTIONS, { "remote-capture-command", required_argument, NULL, OPT_REMOTE_CAPTURE_COMMAND}, - { "remote-sudo", required_argument, NULL, OPT_REMOTE_SUDO }, + { "remote-sudo", no_argument, NULL, OPT_REMOTE_SUDO }, { "remote-noprom", no_argument, NULL, OPT_REMOTE_NOPROM }, { 0, 0, 0, 0} }; @@ -396,7 +396,7 @@ int main(int argc, char *argv[]) extcap_help_add_option(extcap_conf, "--proxycommand ", "the command to use as proxy the the ssh connection"); extcap_help_add_option(extcap_conf, "--remote-interface ", "the remote capture interface"); extcap_help_add_option(extcap_conf, "--remote-capture-command ", "the remote capture command"); - extcap_help_add_option(extcap_conf, "--remote-sudo yes", "use sudo on the remote machine to capture"); + extcap_help_add_option(extcap_conf, "--remote-sudo", "use sudo on the remote machine to capture"); extcap_help_add_option(extcap_conf, "--remote-noprom", "don't use promiscuous mode on the remote machine"); extcap_help_add_option(extcap_conf, "--remote-filter ", "a filter for remote capture (default: don't " "listen on local interfaces IPs)");