summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-19 17:17:07 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-19 18:21:42 +1000
commit162e7bc5b4679ab9be66730ea6b36ed3d25f0643 (patch)
treed18e989f399373ec09a96f7367333a65204f8e0a /source4/param
parentdcf35ab487f9213d4424493257903971ebe3ebbf (diff)
downloadsamba-162e7bc5b4679ab9be66730ea6b36ed3d25f0643.tar.gz
samba-162e7bc5b4679ab9be66730ea6b36ed3d25f0643.tar.bz2
samba-162e7bc5b4679ab9be66730ea6b36ed3d25f0643.zip
s4-param: set SMB_CONF_PATH when we load a smb.conf
this is inherited by child python processes, to ensure they get the right smb.conf if they don't have one specified. Fixes bug 7301 Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/loadparm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 2bee0fbd86..b7dcd9bcee 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -2571,6 +2571,12 @@ bool lp_load(struct loadparm_context *lp_ctx, const char *filename)
for a missing smb.conf */
reload_charcnv(lp_ctx);
+ if (bRetval == true) {
+ /* set this up so that any child python tasks will
+ find the right smb.conf */
+ setenv("SMB_CONF_PATH", filename, 1);
+ }
+
return bRetval;
}