]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:client: Use samba_popt_get_context()
authorAndreas Schneider <asn@samba.org>
Wed, 11 Nov 2020 08:56:41 +0000 (09:56 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 20 May 2021 02:58:36 +0000 (02:58 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/client/client.c

index 0da64cbdbd8c9a019279d46a84c6883c5bee9c59..b20ac986dc98b3bb04fd2e868d75ab2594063d79 100644 (file)
@@ -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 <password>");
 
        creds = samba_cmdline_get_creds();