summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-12-14 19:38:23 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-14 19:38:23 +0100
commitffe42b9015b7bbfeb917930b6a48423344adbe59 (patch)
tree4db839245f33f76a370b8f0ddda339804d4133b8 /source3
parent16352dd60b359343520d3d613f92865bba8c9a2c (diff)
downloadsamba-ffe42b9015b7bbfeb917930b6a48423344adbe59.tar.gz
samba-ffe42b9015b7bbfeb917930b6a48423344adbe59.tar.bz2
samba-ffe42b9015b7bbfeb917930b6a48423344adbe59.zip
wbinfo: use POPT_COMMON_CONFIGFILE
We can't use POPT_COMMON_SAMBA as the -s option is already used by -s, --sid-to-name=SID. Also load the config file after processing the cmdline options metze (This used to be commit 33cbd6903e8b468a782fb5d6913eb82824d3b347)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/wbinfo.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c
index 2466af142d..37ff8a78c7 100644
--- a/source3/nsswitch/wbinfo.c
+++ b/source3/nsswitch/wbinfo.c
@@ -1340,6 +1340,7 @@ int main(int argc, char **argv, char **envp)
/* "user%password,DOM\\user%password,user@EXAMPLE.COM,EXAMPLE.COM\\user%password" }, */
#endif
{ "separator", 0, POPT_ARG_NONE, 0, OPT_SEPARATOR, "Get the active winbind separator", NULL },
+ POPT_COMMON_CONFIGFILE
POPT_COMMON_VERSION
POPT_TABLEEND
};
@@ -1347,16 +1348,6 @@ int main(int argc, char **argv, char **envp)
/* Samba client initialisation */
load_case_tables();
- if (!lp_load(get_dyn_CONFIGFILE(), True, False, False, True)) {
- d_fprintf(stderr, "wbinfo: error opening config file %s. Error was %s\n",
- get_dyn_CONFIGFILE(), strerror(errno));
- exit(1);
- }
-
- if (!init_names())
- return 1;
-
- load_interfaces();
/* Parse options */
@@ -1375,6 +1366,17 @@ int main(int argc, char **argv, char **envp)
poptFreeContext(pc);
+ if (!lp_load(get_dyn_CONFIGFILE(), True, False, False, True)) {
+ d_fprintf(stderr, "wbinfo: error opening config file %s. Error was %s\n",
+ get_dyn_CONFIGFILE(), strerror(errno));
+ exit(1);
+ }
+
+ if (!init_names())
+ return 1;
+
+ load_interfaces();
+
pc = poptGetContext(NULL, argc, (const char **)argv, long_options,
POPT_CONTEXT_KEEP_FIRST);