summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2021-01-14 10:53:35 +0100
committerAndrew Bartlett <abartlet@samba.org>2021-06-20 23:26:32 +0000
commit387bb56bcdf7701717c85595d535d979bc043c71 (patch)
treef3ddd9a94e75975496823f79f862b8bd9bbd960a /nsswitch
parent2e520feace893411522bf02718dd91d12de91074 (diff)
downloadsamba-387bb56bcdf7701717c85595d535d979bc043c71.tar.gz
nsswitch: Migrate wbinfo to new cmdline option parser
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/wbinfo.c13
-rw-r--r--nsswitch/wscript_build2
2 files changed, 11 insertions, 4 deletions
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index c8006f85d6e..1656f02f0e6 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -25,7 +25,7 @@
#include "winbind_client.h"
#include "libwbclient/wbclient.h"
#include "../libcli/auth/libcli_auth.h"
-#include "lib/cmdline/popt_common.h"
+#include "lib/cmdline/cmdline.h"
#include "lib/afs/afs_settoken.h"
#include "lib/util/smb_strtox.h"
#include "lib/util/string_wrappers.h"
@@ -2812,8 +2812,15 @@ int main(int argc, const char **argv, char **envp)
/* Parse options */
- pc = poptGetContext("wbinfo", argc, argv,
- long_options, 0);
+ pc = samba_popt_get_context(getprogname(),
+ argc,
+ argv,
+ long_options,
+ 0);
+ if (pc == NULL) {
+ DBG_ERR("Failed to setup popt context!\n");
+ exit(1);
+ }
/* Parse command line options */
diff --git a/nsswitch/wscript_build b/nsswitch/wscript_build
index e612377962c..afd7453670b 100644
--- a/nsswitch/wscript_build
+++ b/nsswitch/wscript_build
@@ -143,5 +143,5 @@ bld.SAMBA_SUBSYSTEM('WB_REQTRANS',
bld.SAMBA_BINARY('wbinfo',
source='wbinfo.c',
- deps='samba-util LIBCLI_AUTH popt POPT_SAMBA wbclient LIBAFS_SETTOKEN'
+ deps='samba-util LIBCLI_AUTH popt cmdline wbclient LIBAFS_SETTOKEN'
)