From: Tim Beale Date: Tue, 22 Jan 2019 22:07:42 +0000 (+1300) Subject: s3:rpclient: rpclient help is not very helpful X-Git-Tag: ldb-1.6.1~433 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e903d37ea4a8372f819f8bdbec7dfeef1799f612;p=thirdparty%2Fsamba.git 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...] Options: -c, --command=COMMANDS Execute semicolon separated cmds ... Signed-off-by: Tim Beale Reviewed-by: Ralph Boehme --- diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 9f95f1a7a8c..6cfacb19cfe 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -982,6 +982,8 @@ out_free: pc = poptGetContext("rpcclient", argc, const_argv, long_options, 0); + poptSetOtherOptionHelp(pc, "[OPTION...] \nOptions:"); + if (argc == 1) { poptPrintHelp(pc, stderr, 0); goto done;