1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

s3:rpclient: rpclient help is not very helpful

The help was not telling me that there was a mandatory 'server' argument
that I needed to specify. After trying several different combinations
of parameters, I eventually had to run the tool in gdb to work out why
it was complaining.

This is the output I was getting:

bin/rpcclient -U$USERNAME%$PASSWORD -I $SERVER_IP
Usage: rpcclient [OPTION...]
  -c, --command=COMMANDS                 Execute semicolon separated
cmds
  -I, --dest-ip=IP                       Specify destination IP address
  -p, --port=PORT                        Specify port number
...

New help output is:

Usage: rpcclient [OPTION...] <server>
Options:
  -c, --command=COMMANDS                 Execute semicolon separated
cmds
...

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Tim Beale 2019-01-23 11:07:42 +13:00 committed by Ralph Boehme
parent 67fc683a3e
commit e903d37ea4

View File

@ -982,6 +982,8 @@ out_free:
pc = poptGetContext("rpcclient", argc, const_argv,
long_options, 0);
poptSetOtherOptionHelp(pc, "[OPTION...] <server>\nOptions:");
if (argc == 1) {
poptPrintHelp(pc, stderr, 0);
goto done;