]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbdotconf: mark "shutdown script" with substitution="1"
authorRalph Boehme <slow@samba.org>
Tue, 5 Nov 2019 11:07:21 +0000 (12:07 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Nov 2019 10:25:36 +0000 (10:25 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
docs-xml/smbdotconf/logon/shutdownscript.xml
source3/rpc_server/winreg/srv_winreg_nt.c

index e66ed92193f51ab066da3978b8993e4465a58d2f..ea5b65fda819c0de0ecad192cb873782f3ffb74f 100644 (file)
@@ -1,6 +1,7 @@
 <samba:parameter name="shutdown script"
                  context="G"
-                                type="string"
+                 type="string"
+                 substitution="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
        <para>This a full path name to a script called by 
index 0fdfa285e3839e8e2f875d86fda39065e657cab1..6c3270d886a1e9692998d4137e6bd760f194edea 100644 (file)
@@ -519,6 +519,8 @@ WERROR _winreg_InitiateSystemShutdown(struct pipes_struct *p,
 WERROR _winreg_InitiateSystemShutdownEx(struct pipes_struct *p,
                                        struct winreg_InitiateSystemShutdownEx *r)
 {
+       const struct loadparm_substitution *lp_sub =
+               loadparm_s3_global_substitution();
        char *shutdown_script = NULL;
        char *msg = NULL;
        char *chkmsg = NULL;
@@ -529,7 +531,7 @@ WERROR _winreg_InitiateSystemShutdownEx(struct pipes_struct *p,
        int ret = -1;
        bool can_shutdown = false;
 
-       shutdown_script = lp_shutdown_script(p->mem_ctx);
+       shutdown_script = lp_shutdown_script(p->mem_ctx, lp_sub);
        if (!shutdown_script) {
                return WERR_NOT_ENOUGH_MEMORY;
        }