smbdotconf: mark "magic output" with substitution="1"
authorRalph Boehme <slow@samba.org>
Thu, 31 Oct 2019 17:47:43 +0000 (18:47 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Nov 2019 10:25:33 +0000 (10:25 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
docs-xml/smbdotconf/misc/magicoutput.xml
source3/smbd/close.c

index 784d09016ac2a2ecdee4f76754b27d0d2fe6ede2..17b3c6737c3ee352e5492c2ab585572adb457383 100644 (file)
@@ -1,6 +1,7 @@
 <samba:parameter name="magic output"
                  context="S"
                  type="string"
+                 substitution="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
        <para>
index 180a5da735b4970af2d80dc1c907505d252c3cc7..2623ca533a0c6ca460bcc1e82215a14ffbdcafe7 100644 (file)
@@ -39,6 +39,8 @@
 static NTSTATUS check_magic(struct files_struct *fsp)
 {
        int ret;
+       const struct loadparm_substitution *lp_sub =
+               loadparm_s3_global_substitution();
        const char *magic_output = NULL;
        SMB_STRUCT_STAT st;
        int tmp_fd, outfd;
@@ -69,8 +71,8 @@ static NTSTATUS check_magic(struct files_struct *fsp)
                goto out;
        }
 
-       if (*lp_magic_output(talloc_tos(), SNUM(conn))) {
-               magic_output = lp_magic_output(talloc_tos(), SNUM(conn));
+       if (*lp_magic_output(talloc_tos(), lp_sub, SNUM(conn))) {
+               magic_output = lp_magic_output(talloc_tos(), lp_sub, SNUM(conn));
        } else {
                magic_output = talloc_asprintf(ctx,
                                "%s.out",