From 162e7bc5b4679ab9be66730ea6b36ed3d25f0643 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 19 Apr 2010 17:17:07 +1000 Subject: [PATCH] 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 --- source4/param/loadparm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 2bee0fbd861..b7dcd9bcee1 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; } -- 2.34.1