]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbdotconf: mark "add group script" with substitution="1"
authorRalph Boehme <slow@samba.org>
Mon, 4 Nov 2019 11:43:06 +0000 (12:43 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Nov 2019 10:25:33 +0000 (10:25 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
docs-xml/smbdotconf/logon/addgroupscript.xml
source3/groupdb/mapping.c

index 18d7230d32cd7b11bfc94d07f03ea0769a86a97b..3b347d010b89a6ea6b471dfbb11b9a892cf6b46b 100644 (file)
@@ -1,6 +1,7 @@
 <samba:parameter name="add group script"
                context="G"
                type="string"
+               substitution="1"
                xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
        <para>
index ed57955edc97cd403380efe431083c3370cb0f64..634f94dc37eff47a4e2be47eaa2ef7fc7c6720bb 100644 (file)
@@ -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;
                }