]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbdotconf: mark "next configfile" with substitution="1"
authorRalph Boehme <slow@samba.org>
Mon, 4 Nov 2019 15:50:41 +0000 (16:50 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Nov 2019 10:25:34 +0000 (10:25 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
docs-xml/smbdotconf/misc/configfile.xml
source3/nmbd/nmbd.c
source3/smbd/server_reload.c
source3/winbindd/winbindd.c

index 566d4306b378fc838184083d161291290b7803ee..3b67fb0045964d348286728eed3704d65e912f7c 100644 (file)
@@ -2,6 +2,7 @@
                  context="G"
                  type="string"
                  function="next_configfile"
+                 substitution="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
        <para>This allows you to override the config file 
index 66cd65ca2088242ce0800e596e473c6eab8078d9..b4097d1dc577475652bd3db9ff91c992422724a5 100644 (file)
@@ -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;
index 898c5110a060ca45decf47598ac6c754811b1799..6e6f68e57167a015a6f2a8b14f1b35d02c0192b9 100644 (file)
@@ -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);
index bb66321ce7249346155db321a61efdd1697b9def..e839f0d19e349ad5211a67234ac2a3912efefaca 100644 (file)
@@ -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);