From: Andreas Schneider Date: Thu, 14 Jan 2021 09:53:35 +0000 (+0100) Subject: nsswitch: Migrate wbinfo to new cmdline option parser X-Git-Tag: tevent-0.11.0~279 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=387bb56bcdf7701717c85595d535d979bc043c71;p=thirdparty%2Fsamba.git nsswitch: Migrate wbinfo to new cmdline option parser Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- 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' )