Skip to content
Snippets Groups Projects
Commit 9acaadea authored by Michael McCormack's avatar Michael McCormack Committed by Alexandre Julliard
Browse files

Return an SID when GetTokenInformation is called with class

TokenOwner.
parent fabfea59
No related branches found
No related tags found
No related merge requests found
......@@ -201,7 +201,7 @@ NTSTATUS WINAPI NtQueryInformationToken(
len = sizeof(TOKEN_PRIVILEGES);
break;
case TokenOwner:
len = sizeof(TOKEN_OWNER);
len = sizeof(TOKEN_OWNER) + sizeof(SID);
break;
case TokenPrimaryGroup:
len = sizeof(TOKEN_PRIMARY_GROUP);
......@@ -264,6 +264,17 @@ NTSTATUS WINAPI NtQueryInformationToken(
tpriv->PrivilegeCount = 1;
}
break;
case TokenOwner:
if (tokeninfo)
{
TOKEN_OWNER *owner = tokeninfo;
PSID sid = (PSID) (owner + 1);
SID_IDENTIFIER_AUTHORITY localSidAuthority = {SECURITY_NT_AUTHORITY};
RtlInitializeSid(sid, &localSidAuthority, 1);
*(RtlSubAuthoritySid(sid, 0)) = SECURITY_INTERACTIVE_RID;
owner->Owner = sid;
}
break;
}
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment