Return an SID when GetTokenInformation is called with class
TokenOwner.
This commit is contained in:
parent
fabfea59c7
commit
9acaadea3f
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue