Commit 9acaadea authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Return an SID when GetTokenInformation is called with class

TokenOwner.
parent fabfea59
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment