1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

smbdotconf: mark "add machine script" with substitution="1"

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Ralph Boehme 2019-11-04 12:49:10 +01:00 committed by Stefan Metzmacher
parent 9e35015739
commit b0198b1831
3 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,7 @@
<samba:parameter name="add machine script"
context="G"
type="string"
type="string"
substitution="1"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>
<para>

View File

@ -663,6 +663,8 @@ static NTSTATUS smb_create_user(TALLOC_CTX *mem_ctx,
const char *account,
struct passwd **passwd_p)
{
const struct loadparm_substitution *lp_sub =
loadparm_s3_global_substitution();
struct passwd *passwd;
char *add_script = NULL;
@ -678,7 +680,7 @@ static NTSTATUS smb_create_user(TALLOC_CTX *mem_ctx,
} else if ( (acct_flags & ACB_WSTRUST) ||
(acct_flags & ACB_SVRTRUST) ||
(acct_flags & ACB_DOMTRUST) ) {
add_script = lp_add_machine_script(mem_ctx);
add_script = lp_add_machine_script(mem_ctx, lp_sub);
} else {
DEBUG(1, ("Unknown user type: %s\n",
pdb_encode_acct_ctrl(acct_flags, NEW_PW_FORMAT_SPACE_PADDED_LEN)));

View File

@ -447,6 +447,8 @@ static NTSTATUS pdb_default_create_user(struct pdb_methods *methods,
TALLOC_CTX *tmp_ctx, const char *name,
uint32_t acb_info, uint32_t *rid)
{
const struct loadparm_substitution *lp_sub =
loadparm_s3_global_substitution();
struct samu *sam_pass;
NTSTATUS status;
struct passwd *pwd;
@ -463,7 +465,7 @@ static NTSTATUS pdb_default_create_user(struct pdb_methods *methods,
if ((acb_info & ACB_NORMAL) && name[strlen(name)-1] != '$') {
add_script = lp_add_user_script(tmp_ctx);
} else {
add_script = lp_add_machine_script(tmp_ctx);
add_script = lp_add_machine_script(tmp_ctx, lp_sub);
}
if (!add_script || add_script[0] == '\0') {