]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbdotconf: mark "dfree command" with substitution="1"
authorStefan Metzmacher <metze@samba.org>
Tue, 15 Oct 2019 14:54:45 +0000 (16:54 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Nov 2019 10:25:32 +0000 (10:25 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
docs-xml/smbdotconf/misc/dfreecommand.xml
source3/smbd/dfree.c

index a1eed4948a669d3ec54c0c0793848e0113681c6a..b12ee0f2923461a7496e98cc01c1d1ec40a1a644 100644 (file)
@@ -1,6 +1,7 @@
 <samba:parameter name="dfree command"
                 context="S"
-                        type="string"
+                type="string"
+                substitution="1"
                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
 
index 31900c847f114f2573ecf29f4ab53f688924a758..d083ce22797ff16726f04d24944c9b87e1b2b5db 100644 (file)
@@ -57,6 +57,8 @@ static uint64_t sys_disk_free(connection_struct *conn,
                              uint64_t *dfree,
                              uint64_t *dsize)
 {
+       const struct loadparm_substitution *lp_sub =
+               loadparm_s3_global_substitution();
        uint64_t dfree_retval;
        uint64_t dfree_q = 0;
        uint64_t bsize_q = 0;
@@ -72,7 +74,7 @@ static uint64_t sys_disk_free(connection_struct *conn,
         * If external disk calculation specified, use it.
         */
 
-       dfree_command = lp_dfree_command(talloc_tos(), SNUM(conn));
+       dfree_command = lp_dfree_command(talloc_tos(), lp_sub, SNUM(conn));
        if (dfree_command && *dfree_command) {
                const char *p;
                char **lines = NULL;