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; }