From: Ralph Boehme Date: Mon, 4 Nov 2019 13:12:08 +0000 (+0100) Subject: smbdotconf: mark "add user script" with substitution="1" X-Git-Tag: ldb-2.1.0~562 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c345289baa1d18abd9975e2079a40b8f38bb384;p=thirdparty%2Fsamba.git smbdotconf: mark "add user script" with substitution="1" Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/docs-xml/smbdotconf/logon/adduserscript.xml b/docs-xml/smbdotconf/logon/adduserscript.xml index 981d6702c15..4be1146f4e7 100644 --- a/docs-xml/smbdotconf/logon/adduserscript.xml +++ b/docs-xml/smbdotconf/logon/adduserscript.xml @@ -1,6 +1,7 @@ diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 4f9b0a91022..f0db42242e9 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -49,10 +49,12 @@ 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; } diff --git a/source3/libnet/libnet_dssync_passdb.c b/source3/libnet/libnet_dssync_passdb.c index dc2700de0e6..ac668bc3b47 100644 --- a/source3/libnet/libnet_dssync_passdb.c +++ b/source3/libnet/libnet_dssync_passdb.c @@ -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) ) { diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index 657970d62b9..71d2a753a5e 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -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); }