From 9e35015739d790ed0d44cd74ad9f8bb308f2d35d Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 4 Nov 2019 12:43:06 +0100 Subject: [PATCH] smbdotconf: mark "add group script" with substitution="1" Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- docs-xml/smbdotconf/logon/addgroupscript.xml | 1 + source3/groupdb/mapping.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs-xml/smbdotconf/logon/addgroupscript.xml b/docs-xml/smbdotconf/logon/addgroupscript.xml index 18d7230d32c..3b347d010b8 100644 --- a/docs-xml/smbdotconf/logon/addgroupscript.xml +++ b/docs-xml/smbdotconf/logon/addgroupscript.xml @@ -1,6 +1,7 @@ diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c index ed57955edc9..634f94dc37e 100644 --- a/source3/groupdb/mapping.c +++ b/source3/groupdb/mapping.c @@ -205,6 +205,8 @@ bool get_domain_group_from_sid(struct dom_sid sid, GROUP_MAP *map) int smb_create_group(const char *unix_group, gid_t *new_gid) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); char *add_script = NULL; int ret = -1; int fd = 0; @@ -214,11 +216,11 @@ int smb_create_group(const char *unix_group, gid_t *new_gid) /* defer to scripts */ - if ( *lp_add_group_script(talloc_tos()) ) { + if ( *lp_add_group_script(talloc_tos(), lp_sub) ) { TALLOC_CTX *ctx = talloc_tos(); add_script = talloc_strdup(ctx, - lp_add_group_script(ctx)); + lp_add_group_script(ctx, lp_sub)); if (!add_script) { return -1; } -- 2.47.3