]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbdotconf: mark "remote announce" with substitution="1"
authorRalph Boehme <slow@samba.org>
Tue, 5 Nov 2019 10:39:27 +0000 (11:39 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Nov 2019 10:25:36 +0000 (10:25 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
docs-xml/smbdotconf/misc/remoteannounce.xml
source3/nmbd/nmbd_sendannounce.c

index ad537c8b41f27b669f93afd203b94fbd88a397f2..04368987e06c89936cc146c230ec1a64ee9fb709 100644 (file)
@@ -1,6 +1,7 @@
 <samba:parameter name="remote announce"
                  context="G"
                  type="string"
+                 substitution="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
        <para>
index a9cdf1c5a5833a8bd146ea084be9ed3cfc8fa75c..48396ddf1c5960f5d77e51b58de8a5084adf13fa 100644 (file)
@@ -461,7 +461,7 @@ void announce_my_servers_removed(void)
 
 void announce_remote(time_t t)
 {
-       char *s;
+       char *s = NULL;
        const char *ptr;
        static time_t last_time = 0;
        char *s2;
@@ -469,13 +469,15 @@ void announce_remote(time_t t)
        char *comment;
        int stype = lp_default_server_announce();
        TALLOC_CTX *frame = NULL;
+       const struct loadparm_substitution *lp_sub =
+               loadparm_s3_global_substitution();
 
        if (last_time && (t < (last_time + REMOTE_ANNOUNCE_INTERVAL)))
                return;
 
        last_time = t;
 
-       s = lp_remote_announce(talloc_tos());
+       s = lp_remote_announce(talloc_tos(), lp_sub);
        if (!*s)
                return;