From: Stefan Metzmacher Date: Tue, 6 Mar 2018 22:42:54 +0000 (+0100) Subject: s3:auth: support AUTH_SESSION_INFO_NTLM in finalize_local_nt_token() X-Git-Tag: talloc-2.1.12~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a0c091eba764e721cfa419e697700ca7a5695014;p=thirdparty%2Fsamba.git s3:auth: support AUTH_SESSION_INFO_NTLM in finalize_local_nt_token() Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c index 2b787ed3592..f5b0e694433 100644 --- a/source3/auth/token_util.c +++ b/source3/auth/token_util.c @@ -808,6 +808,22 @@ NTSTATUS finalize_local_nt_token(struct security_token *result, unbecome_root(); } + if (session_info_flags & AUTH_SESSION_INFO_NTLM) { + struct dom_sid tmp_sid = { 0, }; + + ok = dom_sid_parse(SID_NT_NTLM_AUTHENTICATION, &tmp_sid); + if (!ok) { + return NT_STATUS_NO_MEMORY; + } + + status = add_sid_to_array(result, + &tmp_sid, + &result->sids, + &result->num_sids); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + } if (session_info_flags & AUTH_SESSION_INFO_SIMPLE_PRIVILEGES) { if (security_token_has_builtin_administrators(result)) {