1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-22 05:57:43 +03:00

smbdotconf: mark "set primary group 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-05 12:00:49 +01:00 committed by Stefan Metzmacher
parent 7dc7b9e554
commit 434d2632cb
2 changed files with 6 additions and 3 deletions

View File

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

View File

@ -317,16 +317,18 @@ int smb_delete_group(const char *unix_group)
int smb_set_primary_group(const char *unix_group, const char* unix_user)
{
const struct loadparm_substitution *lp_sub =
loadparm_s3_global_substitution();
char *add_script = NULL;
int ret = -1;
/* defer to scripts */
if ( *lp_set_primary_group_script(talloc_tos()) ) {
if ( *lp_set_primary_group_script(talloc_tos(), lp_sub) ) {
TALLOC_CTX *ctx = talloc_tos();
add_script = talloc_strdup(ctx,
lp_set_primary_group_script(ctx));
lp_set_primary_group_script(ctx, lp_sub));
if (!add_script) {
return -1;
}