summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-31 08:43:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:51 -0500
commitf1938123a613ac81f11b00ff5876a7cc71168cfb (patch)
tree42a657894dccf75d669330fab9f57e8347eb621b /source4/param
parentfc26c0c077078fdb158b104e011265533732c81e (diff)
downloadsamba-f1938123a613ac81f11b00ff5876a7cc71168cfb.tar.gz
samba-f1938123a613ac81f11b00ff5876a7cc71168cfb.tar.bz2
samba-f1938123a613ac81f11b00ff5876a7cc71168cfb.zip
r4444: - initialise registry:HKEY_LOCAL_MACHINE to a reasonable default (where
provision.pl suggests hklm.ldb be put) - fix the globals init not to wipe parametic values after initialising them (this bug prevented default values for parametric parameters) (This used to be commit 6a360c52c1723b4c3485a97ebcfeb907f840a051)
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/loadparm.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 8e535c0900..405caf6fc4 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -933,6 +933,7 @@ static void init_globals(void)
do_parameter("private dir", dyn_PRIVATE_DIR);
do_parameter_var("sam database", "tdb://%s/sam.ldb", dyn_PRIVATE_DIR);
do_parameter_var("spoolss database", "tdb://%s/spoolss.ldb", dyn_PRIVATE_DIR);
+ do_parameter_var("registry:HKEY_LOCAL_MACHINE", "ldb:/%s/hklm.ldb", dyn_PRIVATE_DIR);
do_parameter("guest account", GUEST_ACCOUNT);
/* using UTF8 by default allows us to support all chars */
@@ -1412,7 +1413,7 @@ static BOOL lp_bool(const char *s)
const char *lp_parm_string(int lookup_service, const char *type, const char *option)
{
const char *value = get_parametrics(lookup_service, type, option);
-
+
if (value)
return lp_string(value);
@@ -3025,13 +3026,6 @@ BOOL lp_load(const char *pszFname, BOOL global_only, BOOL save_defaults,
bInGlobalSection = True;
bGlobalOnly = global_only;
- init_globals();
-
- if (save_defaults)
- {
- lp_save_defaults();
- }
-
if (Globals.param_opt != NULL) {
struct param_opt *next;
for (data=Globals.param_opt; data; data=next) {
@@ -3044,6 +3038,13 @@ BOOL lp_load(const char *pszFname, BOOL global_only, BOOL save_defaults,
}
}
+ init_globals();
+
+ if (save_defaults)
+ {
+ lp_save_defaults();
+ }
+
/* We get sections first, so have to start 'behind' to make up */
iServiceIndex = -1;
bRetval = pm_process(n2, do_section, do_parameter);