summaryrefslogtreecommitdiffstats
path: root/source3/param
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-05-26 11:58:11 +0200
committerMichael Adam <obnox@samba.org>2008-05-26 12:00:13 +0200
commit33f632b8b5d39c06da37adf4feb0d1552dd96647 (patch)
tree64897c4426489d0b648fab73d2f2c2708c12f3cd /source3/param
parent1a1fc2f8146ebc6cda852b236c9589e282e4bd8c (diff)
downloadsamba-33f632b8b5d39c06da37adf4feb0d1552dd96647.tar.gz
samba-33f632b8b5d39c06da37adf4feb0d1552dd96647.tar.xz
samba-33f632b8b5d39c06da37adf4feb0d1552dd96647.zip
loadarm: fix testparm with "config backend = registry".
Set the iServiceIndex to "-1" for starup with either config backend (originally only for text backend). Otherwise, process_registry_shares() will fail. Currently, the only user of lp_load_with_registry_shares() is testparm. Michael (This used to be commit 5e2b925367241c41793b2eb7a628e9fc9f3ac8ff)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index e45c8b89b7..c272274837 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -8746,6 +8746,9 @@ bool lp_load_ex(const char *pszFname,
lp_save_defaults();
}
+ /* We get sections first, so have to start 'behind' to make up */
+ iServiceIndex = -1;
+
if (Globals.param_opt != NULL) {
data = Globals.param_opt;
while (data) {
@@ -8769,8 +8772,6 @@ bool lp_load_ex(const char *pszFname,
add_to_file_list(pszFname, n2);
- /* We get sections first, so have to start 'behind' to make up */
- iServiceIndex = -1;
bRetval = pm_process(n2, do_section, do_parameter, NULL);
SAFE_FREE(n2);