From a0185c7efbdba9405bcfade9ad89675532a43ffe Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Tue, 5 Nov 2019 12:07:21 +0100 Subject: [PATCH] smbdotconf: mark "shutdown script" with substitution="1" Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- docs-xml/smbdotconf/logon/shutdownscript.xml | 3 ++- source3/rpc_server/winreg/srv_winreg_nt.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs-xml/smbdotconf/logon/shutdownscript.xml b/docs-xml/smbdotconf/logon/shutdownscript.xml index e66ed92193f..ea5b65fda81 100644 --- a/docs-xml/smbdotconf/logon/shutdownscript.xml +++ b/docs-xml/smbdotconf/logon/shutdownscript.xml @@ -1,6 +1,7 @@ This a full path name to a script called by diff --git a/source3/rpc_server/winreg/srv_winreg_nt.c b/source3/rpc_server/winreg/srv_winreg_nt.c index 0fdfa285e38..6c3270d886a 100644 --- a/source3/rpc_server/winreg/srv_winreg_nt.c +++ b/source3/rpc_server/winreg/srv_winreg_nt.c @@ -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; } -- 2.47.3