]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbdotconf: mark "add user script" with substitution="1"
authorRalph Boehme <slow@samba.org>
Mon, 4 Nov 2019 13:12:08 +0000 (14:12 +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/adduserscript.xml
source3/auth/auth_util.c
source3/libnet/libnet_dssync_passdb.c
source3/passdb/pdb_interface.c

index 981d6702c15f6b524f5ee813101e31db568ac53b..4be1146f4e7a37e3eb7303ec0f3ec2065c627929 100644 (file)
@@ -1,6 +1,7 @@
 <samba:parameter name="add user script"
                  context="G"
-                                type="string"
+                 type="string"
+                 substitution="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
        <para>
index 4f9b0a91022498e0c2910c9d3378e781697af4ba..f0db42242e9c69e2ab1c392647106413b73c0ce8 100644 (file)
 static int _smb_create_user(const char *domain, const char *unix_username, const char *homedir)
 {
        TALLOC_CTX *ctx = talloc_tos();
+       const struct loadparm_substitution *lp_sub =
+               loadparm_s3_global_substitution();
        char *add_script;
        int ret;
 
-       add_script = lp_add_user_script(ctx);
+       add_script = lp_add_user_script(ctx, lp_sub);
        if (!add_script || !*add_script) {
                return -1;
        }
index dc2700de0e618aaf81b24f8ba11184908ac3d0d3..ac668bc3b474be8bc6c82a7c21350ba1e2193209 100644 (file)
@@ -676,7 +676,7 @@ static NTSTATUS smb_create_user(TALLOC_CTX *mem_ctx,
 
        /* Create appropriate user */
        if (acct_flags & ACB_NORMAL) {
-               add_script = lp_add_user_script(mem_ctx);
+               add_script = lp_add_user_script(mem_ctx, lp_sub);
        } else if ( (acct_flags & ACB_WSTRUST) ||
                    (acct_flags & ACB_SVRTRUST) ||
                    (acct_flags & ACB_DOMTRUST) ) {
index 657970d62b9bd7eb8c26ff66a0fff5e582b5a02e..71d2a753a5ec2f3d57823bd59330ce7ba505a678 100644 (file)
@@ -463,7 +463,7 @@ static NTSTATUS pdb_default_create_user(struct pdb_methods *methods,
                fstring name2;
 
                if ((acb_info & ACB_NORMAL) && name[strlen(name)-1] != '$') {
-                       add_script = lp_add_user_script(tmp_ctx);
+                       add_script = lp_add_user_script(tmp_ctx, lp_sub);
                } else {
                        add_script = lp_add_machine_script(tmp_ctx, lp_sub);
                }