summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-10-15 22:27:10 -0700
committerJeremy Allison <jra@samba.org>2010-10-16 06:46:19 +0000
commit83871d2642378d1cd0a8bad0a2d5a9a92cb1cfe8 (patch)
tree9b1d5e5dd8a3c25989d0ab69ba83bbc9a676e2b8
parentbcdf781545ae31f9ec7caf2c60f74d27a962de6d (diff)
downloadsamba-83871d2642378d1cd0a8bad0a2d5a9a92cb1cfe8.tar.gz
samba-83871d2642378d1cd0a8bad0a2d5a9a92cb1cfe8.tar.bz2
samba-83871d2642378d1cd0a8bad0a2d5a9a92cb1cfe8.zip
Don't arbitrarily clean all parametric options in add_a_service(),
that is called from many places, not just smb.conf processing. Only clean parametric options when doing actual smb.conf reading (or registry equivalent). Michael Adams, Volker, Metze, please check. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Oct 16 06:46:19 UTC 2010 on sn-devel-104
-rw-r--r--source3/param/loadparm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index f9a908dce9..8dadebfa89 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -6277,9 +6277,6 @@ static int add_a_service(const struct service *pservice, const char *name)
if (name) {
i = getservicebyname(name, NULL);
if (i >= 0) {
- /* Clean all parametric options for service */
- /* They will be added during parsing again */
- free_param_opts(&ServicePtrs[i]->param_opt);
return (i);
}
}
@@ -8111,6 +8108,9 @@ static bool do_section(const char *pszSectionName, void *userdata)
DEBUG(0, ("Failed to add a new service\n"));
return (False);
}
+ /* Clean all parametric options for service */
+ /* They will be added during parsing again */
+ free_param_opts(&ServicePtrs[iServiceIndex]->param_opt);
}
return (bRetval);