smbdotconf: mark "root postexec" with substitution="1"
authorRalph Boehme <slow@samba.org>
Mon, 4 Nov 2019 11:19:24 +0000 (12:19 +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/rootpostexec.xml
source3/smbd/service.c

index d50ca7f48bbe67863a8e12837fb9adad189d8b97..4e74fc8e00a186a2fa56789c745d376fa5c0bfab 100644 (file)
@@ -1,6 +1,7 @@
 <samba:parameter name="root postexec"
                  context="S"
                  type="string"
+                 substitution="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
        <para>
index 70dc1466b9621c16700986052dee3a30d06daa07..07732a2329733698352c76a36f7cda95be3227f8 100644 (file)
@@ -1188,7 +1188,7 @@ void close_cnum(connection_struct *conn, uint64_t vuid)
 
        change_to_root_user();
        /* execute any "root postexec = " line */
-       if (*lp_root_postexec(talloc_tos(), SNUM(conn)))  {
+       if (*lp_root_postexec(talloc_tos(), lp_sub, SNUM(conn)))  {
                char *cmd = talloc_sub_full(talloc_tos(),
                                        lp_const_servicename(SNUM(conn)),
                                        conn->session_info->unix_info->unix_name,
@@ -1196,7 +1196,7 @@ void close_cnum(connection_struct *conn, uint64_t vuid)
                                        conn->session_info->unix_token->gid,
                                        conn->session_info->unix_info->sanitized_username,
                                        conn->session_info->info->domain_name,
-                                       lp_root_postexec(talloc_tos(), SNUM(conn)));
+                                       lp_root_postexec(talloc_tos(), lp_sub, SNUM(conn)));
                smbrun(cmd, NULL, NULL);
                TALLOC_FREE(cmd);
        }