summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-07-13 10:57:02 +0200
committerMichael Adam <obnox@samba.org>2013-04-29 13:05:47 +0200
commit89d3067c22406d943555fcc7c41e7d57ddfbb152 (patch)
tree12ad4aed77245d220cc543f2b60f81d5fffb67ed /source3
parentd3633c08cd5e997d329ff42930d320a8eb4ac7f2 (diff)
downloadsamba-89d3067c22406d943555fcc7c41e7d57ddfbb152.tar.gz
samba-89d3067c22406d943555fcc7c41e7d57ddfbb152.tar.bz2
samba-89d3067c22406d943555fcc7c41e7d57ddfbb152.zip
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 <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/regedit.c6
1 files changed, 5 insertions, 1 deletions
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);