https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0208a4d196805fd610a51…
commit 0208a4d196805fd610a511b4ff71af405ca38297
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Tue Jun 26 22:14:03 2018 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Jun 27 23:40:16 2018 +0200
[LSASRV] Add the SE_GROUP_OWNER attributes to the token owner.
---
dll/win32/lsasrv/authpackage.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/dll/win32/lsasrv/authpackage.c b/dll/win32/lsasrv/authpackage.c
index 0e9ab0b701..22e668c600 100644
--- a/dll/win32/lsasrv/authpackage.c
+++ b/dll/win32/lsasrv/authpackage.c
@@ -1137,7 +1137,7 @@ LsapSetTokenOwner(
IN LSA_TOKEN_INFORMATION_TYPE TokenInformationType)
{
PLSA_TOKEN_INFORMATION_V1 TokenInfo1;
- PSID OwnerSid = NULL;
+ PSID_AND_ATTRIBUTES OwnerSid = NULL;
ULONG i, Length;
if (TokenInformationType == LsaTokenInformationV1)
@@ -1147,24 +1147,25 @@ LsapSetTokenOwner(
if (TokenInfo1->Owner.Owner != NULL)
return STATUS_SUCCESS;
- OwnerSid = TokenInfo1->User.User.Sid;
+ OwnerSid = &TokenInfo1->User.User;
for (i = 0; i < TokenInfo1->Groups->GroupCount; i++)
{
if (EqualSid(TokenInfo1->Groups->Groups[i].Sid,
LsapAdministratorsSid))
{
- OwnerSid = LsapAdministratorsSid;
+ OwnerSid = &TokenInfo1->Groups->Groups[i];
break;
}
}
- Length = RtlLengthSid(OwnerSid);
+ Length = RtlLengthSid(OwnerSid->Sid);
TokenInfo1->Owner.Owner = DispatchTable.AllocateLsaHeap(Length);
if (TokenInfo1->Owner.Owner == NULL)
return STATUS_INSUFFICIENT_RESOURCES;
RtlCopyMemory(TokenInfo1->Owner.Owner,
- OwnerSid,
+ OwnerSid->Sid,
Length);
+ OwnerSid->Attributes |= SE_GROUP_OWNER;
}
return STATUS_SUCCESS;