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

index 7b7df25638862aa83a5031acbce6553affe7c0e8..01a97c3dba498937ea658d7de11297dfc847bef6 100644 (file)
@@ -1,6 +1,7 @@
 <samba:parameter name="panic action"
                  context="G"
                  type="string"
+                 substitution="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
        <para>This is a Samba developer option that allows a 
index ce89c0659af6b291e2648bc852db2534020f64d4..9c8717172a671c884d8ef4daccaf733a7ebd9d32 100644 (file)
@@ -821,6 +821,8 @@ gid_t nametogid(const char *name)
 
 void smb_panic_s3(const char *why)
 {
+       const struct loadparm_substitution *lp_sub =
+               loadparm_s3_global_substitution();
        char *cmd;
        int result;
 
@@ -835,7 +837,7 @@ void smb_panic_s3(const char *why)
        prctl(PR_SET_PTRACER, getpid(), 0, 0, 0);
 #endif
 
-       cmd = lp_panic_action(talloc_tos());
+       cmd = lp_panic_action(talloc_tos(), lp_sub);
        if (cmd && *cmd) {
                DEBUG(0, ("smb_panic(): calling panic action [%s]\n", cmd));
                result = system(cmd);