From 434d2632cb95cfe6170f554afa7c31810b298037 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Tue, 5 Nov 2019 12:00:49 +0100 Subject: [PATCH] smbdotconf: mark "set primary group script" with substitution="1" Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- docs-xml/smbdotconf/logon/setprimarygroupscript.xml | 3 ++- source3/groupdb/mapping.c | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs-xml/smbdotconf/logon/setprimarygroupscript.xml b/docs-xml/smbdotconf/logon/setprimarygroupscript.xml index 60d2cae1325..8d1ae366f44 100644 --- a/docs-xml/smbdotconf/logon/setprimarygroupscript.xml +++ b/docs-xml/smbdotconf/logon/setprimarygroupscript.xml @@ -1,6 +1,7 @@ diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c index 7562e997a8c..4a2e17d8bee 100644 --- a/source3/groupdb/mapping.c +++ b/source3/groupdb/mapping.c @@ -317,16 +317,18 @@ int smb_delete_group(const char *unix_group) int smb_set_primary_group(const char *unix_group, const char* unix_user) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); char *add_script = NULL; int ret = -1; /* defer to scripts */ - if ( *lp_set_primary_group_script(talloc_tos()) ) { + if ( *lp_set_primary_group_script(talloc_tos(), lp_sub) ) { TALLOC_CTX *ctx = talloc_tos(); add_script = talloc_strdup(ctx, - lp_set_primary_group_script(ctx)); + lp_set_primary_group_script(ctx, lp_sub)); if (!add_script) { return -1; } -- 2.47.3