]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbdotconf: mark "preexec" with substitution="1"
authorRalph Boehme <slow@samba.org>
Mon, 4 Nov 2019 10:30:22 +0000 (11:30 +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/preexec.xml
source3/smbd/service.c

index e5d07ef13464ea6219ffaf90f0d84c5d6660cb5e..7faf89a4f35660cbf6300375b4a86f1fa26b5e1e 100644 (file)
@@ -1,6 +1,7 @@
 <samba:parameter name="preexec"
                  context="S"
                  type="string"
+                 substitution="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <synonym>exec</synonym>
 <description>
index 10a215e999e69f9f8ca7403bc648153207d2e4b9..70dc1466b9621c16700986052dee3a30d06daa07 100644 (file)
@@ -770,7 +770,7 @@ static NTSTATUS make_connection_snum(struct smbXsrv_connection *xconn,
         * to below */
 
        /* execute any "preexec = " line */
-       if (*lp_preexec(talloc_tos(), snum)) {
+       if (*lp_preexec(talloc_tos(), lp_sub, snum)) {
                char *cmd = talloc_sub_full(talloc_tos(),
                                        lp_const_servicename(SNUM(conn)),
                                        conn->session_info->unix_info->unix_name,
@@ -778,7 +778,7 @@ static NTSTATUS make_connection_snum(struct smbXsrv_connection *xconn,
                                        conn->session_info->unix_token->gid,
                                        conn->session_info->unix_info->sanitized_username,
                                        conn->session_info->info->domain_name,
-                                       lp_preexec(talloc_tos(), snum));
+                                       lp_preexec(talloc_tos(), lp_sub, snum));
                ret = smbrun(cmd, NULL, NULL);
                TALLOC_FREE(cmd);
                if (ret != 0 && lp_preexec_close(snum)) {