]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbdotconf: mark "delete user from group script" with substitution="1"
authorRalph Boehme <slow@samba.org>
Mon, 4 Nov 2019 16:31:57 +0000 (17:31 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Nov 2019 10:25:34 +0000 (10:25 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
docs-xml/smbdotconf/logon/deleteuserfromgroupscript.xml
source3/groupdb/mapping.c

index 07a21a732d1e56f47175662ee7412db5f7b50941..1654a0909df3a78c69a73303794793fe14a6956b 100644 (file)
@@ -1,6 +1,7 @@
 <samba:parameter name="delete user from group script"
                  context="G"
-                                type="string"
+                 type="string"
+                 substitution="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
        <para>Full path to the script that will be called when 
index ed1d5716956a20225b5ba69c92b80234f3432dd6..7562e997a8ce019b29625a9c2800ddb121802e6a 100644 (file)
@@ -401,16 +401,18 @@ int smb_add_user_group(const char *unix_group, const char *unix_user)
 
 int smb_delete_user_group(const char *unix_group, const char *unix_user)
 {
+       const struct loadparm_substitution *lp_sub =
+               loadparm_s3_global_substitution();
        char *del_script = NULL;
        int ret = -1;
 
        /* defer to scripts */
 
-       if ( *lp_delete_user_from_group_script(talloc_tos()) ) {
+       if ( *lp_delete_user_from_group_script(talloc_tos(), lp_sub) ) {
                TALLOC_CTX *ctx = talloc_tos();
 
                del_script = talloc_strdup(ctx,
-                               lp_delete_user_from_group_script(ctx));
+                               lp_delete_user_from_group_script(ctx, lp_sub));
                if (!del_script) {
                        return -1;
                }