summaryrefslogtreecommitdiffstats
path: root/source/param/loadparm.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-05-15 02:25:34 +0200
committerKarolin Seeger <kseeger@samba.org>2008-07-16 09:02:08 +0200
commit865abe2ba23b0b1bbd16a67aa509eb22fa34376c (patch)
treec46da3960a4fcc7f277cf914b4afdd139a4a4674 /source/param/loadparm.c
parent80c2a47164372033025a1e3c9c953eba7b2762bb (diff)
downloadsamba-865abe2ba23b0b1bbd16a67aa509eb22fa34376c.tar.gz
samba-865abe2ba23b0b1bbd16a67aa509eb22fa34376c.tar.xz
samba-865abe2ba23b0b1bbd16a67aa509eb22fa34376c.zip
loadparm: add parameter allow_registry_shares to lp_load_ex().
This allows for registry shares to be activated, i.e. loaded into the services array at lp_load() time. Michael (cherry picked from commit b3233ecefd5df745ba7e10511f9ab36064036b10) (cherry picked from commit 02fa674dd62ad400502046fbe9e05a1578b4deab)
Diffstat (limited to 'source/param/loadparm.c')
-rw-r--r--source/param/loadparm.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index 4c8e304bd10..f24d57b0daf 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -8731,7 +8731,8 @@ bool lp_load_ex(const char *pszFname,
bool save_defaults,
bool add_ipc,
bool initialize_globals,
- bool allow_include_registry)
+ bool allow_include_registry,
+ bool allow_registry_shares)
{
char *n2 = NULL;
bool bRetval;
@@ -8805,7 +8806,8 @@ bool lp_load_ex(const char *pszFname,
lp_kill_all_services();
return lp_load_ex(pszFname, global_only, save_defaults,
add_ipc, initialize_globals,
- allow_include_registry);
+ allow_include_registry,
+ allow_registry_shares);
}
} else if (lp_config_backend_is_registry()) {
bRetval = process_registry_globals();
@@ -8815,6 +8817,10 @@ bool lp_load_ex(const char *pszFname,
bRetval = false;
}
+ if (bRetval && lp_registry_shares() && allow_registry_shares) {
+ bRetval = process_registry_shares();
+ }
+
lp_add_auto_services(lp_auto_services());
if (add_ipc) {
@@ -8856,7 +8862,7 @@ bool lp_load(const char *pszFname,
save_defaults,
add_ipc,
initialize_globals,
- true);
+ true, false);
}
bool lp_load_initial_only(const char *pszFname)
@@ -8866,6 +8872,7 @@ bool lp_load_initial_only(const char *pszFname)
false,
false,
true,
+ false,
false);
}