From: Ralph Boehme Date: Tue, 5 Nov 2019 09:52:56 +0000 (+0100) Subject: smbdotconf: mark "log nt token command" with substitution="1" X-Git-Tag: ldb-2.1.0~540 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e46ea02939a13ef41b36500874baa90fa29e973e;p=thirdparty%2Fsamba.git smbdotconf: mark "log nt token command" with substitution="1" Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/docs-xml/smbdotconf/security/lognttokencommand.xml b/docs-xml/smbdotconf/security/lognttokencommand.xml index 66ec6c9e132..0ea269e92a1 100644 --- a/docs-xml/smbdotconf/security/lognttokencommand.xml +++ b/docs-xml/smbdotconf/security/lognttokencommand.xml @@ -1,6 +1,7 @@ This option can be set to a command that will be called when new nt diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index f0db42242e9..9432461d1f8 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -411,13 +411,15 @@ bool make_user_info_guest(TALLOC_CTX *mem_ctx, static NTSTATUS log_nt_token(struct security_token *token) { TALLOC_CTX *frame = talloc_stackframe(); + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); char *command; char *group_sidstr; struct dom_sid_buf buf; size_t i; - if ((lp_log_nt_token_command(frame) == NULL) || - (strlen(lp_log_nt_token_command(frame)) == 0)) { + if ((lp_log_nt_token_command(frame, lp_sub) == NULL) || + (strlen(lp_log_nt_token_command(frame, lp_sub)) == 0)) { TALLOC_FREE(frame); return NT_STATUS_OK; } @@ -430,7 +432,7 @@ static NTSTATUS log_nt_token(struct security_token *token) } command = talloc_string_sub( - frame, lp_log_nt_token_command(frame), + frame, lp_log_nt_token_command(frame, lp_sub), "%s", dom_sid_str_buf(&token->sids[0], &buf)); command = talloc_string_sub(frame, command, "%t", group_sidstr);