1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

smbdotconf: mark "shutdown script" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Ralph Boehme 2019-11-05 12:07:21 +01:00 committed by Stefan Metzmacher
parent fd72181fd0
commit a0185c7efb
2 changed files with 5 additions and 2 deletions

View 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

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