From: Ralph Boehme Date: Mon, 4 Nov 2019 15:50:41 +0000 (+0100) Subject: smbdotconf: mark "next configfile" with substitution="1" X-Git-Tag: ldb-2.1.0~556 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb434275164c21494bbb8be7d0f36c7289b20ce0;p=thirdparty%2Fsamba.git smbdotconf: mark "next configfile" with substitution="1" Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/docs-xml/smbdotconf/misc/configfile.xml b/docs-xml/smbdotconf/misc/configfile.xml index 566d4306b37..3b67fb00459 100644 --- a/docs-xml/smbdotconf/misc/configfile.xml +++ b/docs-xml/smbdotconf/misc/configfile.xml @@ -2,6 +2,7 @@ context="G" type="string" function="next_configfile" + substitution="1" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> This allows you to override the config file diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index 66cd65ca208..b4097d1dc57 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -389,12 +389,14 @@ static void reload_interfaces(time_t t) static bool reload_nmbd_services(bool test) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); bool ret; set_remote_machine_name("nmbd", False); if ( lp_loaded() ) { - char *fname = lp_next_configfile(talloc_tos()); + char *fname = lp_next_configfile(talloc_tos(), lp_sub); if (file_exist(fname) && !strcsequal(fname,get_dyn_CONFIGFILE())) { set_dyn_CONFIGFILE(fname); test = False; diff --git a/source3/smbd/server_reload.c b/source3/smbd/server_reload.c index 898c5110a06..6e6f68e5716 100644 --- a/source3/smbd/server_reload.c +++ b/source3/smbd/server_reload.c @@ -120,11 +120,13 @@ bool reload_services(struct smbd_server_connection *sconn, bool (*snumused) (struct smbd_server_connection *, int), bool test) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); struct smbXsrv_connection *xconn = NULL; bool ret; if (lp_loaded()) { - char *fname = lp_next_configfile(talloc_tos()); + char *fname = lp_next_configfile(talloc_tos(), lp_sub); if (file_exist(fname) && !strcsequal(fname, get_dyn_CONFIGFILE())) { set_dyn_CONFIGFILE(fname); diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index bb66321ce72..e839f0d19e3 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -101,10 +101,12 @@ struct imessaging_context *winbind_imessaging_context(void) static bool reload_services_file(const char *lfile) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); bool ret; if (lp_loaded()) { - char *fname = lp_next_configfile(talloc_tos()); + char *fname = lp_next_configfile(talloc_tos(), lp_sub); if (file_exist(fname) && !strcsequal(fname,get_dyn_CONFIGFILE())) { set_dyn_CONFIGFILE(fname);