From 7b70a72b15c64347d00f5e081b1ce5c82c5c8bcb Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 11 Nov 2020 09:56:41 +0100 Subject: [PATCH] s3:client: Use samba_popt_get_context() Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- source3/client/client.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source3/client/client.c b/source3/client/client.c index 0da64cbdbd8..b20ac986dc9 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -6426,7 +6426,16 @@ int main(int argc,char *argv[]) lp_set_cmdline("log level", "1"); /* skip argv(0) */ - pc = poptGetContext("smbclient", argc, const_argv, long_options, 0); + pc = samba_popt_get_context(getprogname(), + argc, + const_argv, + long_options, + 0); + if (pc == NULL) { + DBG_ERR("Failed to setup popt context!\n"); + exit(1); + } + poptSetOtherOptionHelp(pc, "[OPTIONS] service "); creds = samba_cmdline_get_creds(); -- 2.47.3