From 89d3067c22406d943555fcc7c41e7d57ddfbb152 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 13 Jul 2012 10:57:02 +0200 Subject: regedit: load the configuration after processing the command line this way the "-s" parameter can change the config file to be loaded... Signed-off-by: Michael Adam Reviewed-by: Andreas Schneider --- source3/utils/regedit.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/utils/regedit.c b/source3/utils/regedit.c index 79b05a0c1e..b088ea47cd 100644 --- a/source3/utils/regedit.c +++ b/source3/utils/regedit.c @@ -109,7 +109,6 @@ int main(int argc, char **argv) setup_logging("regedit", DEBUG_DEFAULT_STDERR); lp_set_cmdline("log level", "0"); - lp_load_global(get_dyn_CONFIGFILE()); /* process options */ auth_info = user_auth_info_init(frame); @@ -123,6 +122,11 @@ int main(int argc, char **argv) /* TODO */ } + if (!lp_load_global(get_dyn_CONFIGFILE())) { + DEBUG(0, ("ERROR loading config file...\n")); + exit(1); + } + /* some simple tests */ rv = reg_open_samba3(frame, &ctx); -- cgit