1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

smbdotconf: mark "add user to 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-04 14:17:43 +01:00 committed by Stefan Metzmacher
parent 4c345289ba
commit 00c4d9ec1a
2 changed files with 6 additions and 3 deletions

View File

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

View File

@ -357,16 +357,18 @@ int smb_set_primary_group(const char *unix_group, const char* unix_user)
int smb_add_user_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_add_user_to_group_script(talloc_tos()) ) {
if ( *lp_add_user_to_group_script(talloc_tos(), lp_sub) ) {
TALLOC_CTX *ctx = talloc_tos();
add_script = talloc_strdup(ctx,
lp_add_user_to_group_script(ctx));
lp_add_user_to_group_script(ctx, lp_sub));
if (!add_script) {
return -1;
}