From: Ralph Boehme Date: Tue, 5 Nov 2019 11:00:49 +0000 (+0100) Subject: smbdotconf: mark "set primary group script" with substitution="1" X-Git-Tag: ldb-2.1.0~527 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=434d2632cb95cfe6170f554afa7c31810b298037;p=thirdparty%2Fsamba.git smbdotconf: mark "set primary group script" with substitution="1" Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- 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; }