Commit 2b76f866 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

ntdll: Add a stub for TokenElevation in NtQueryInformationToken.

parent 2e5d7064
......@@ -249,29 +249,47 @@ NTSTATUS WINAPI NtQueryInformationToken(
ULONG tokeninfolength,
PULONG retlen )
{
ULONG len;
static const ULONG info_len [] =
{
0,
0, /* TokenUser */
0, /* TokenGroups */
0, /* TokenPrivileges */
0, /* TokenOwner */
0, /* TokenPrimaryGroup */
0, /* TokenDefaultDacl */
sizeof(TOKEN_SOURCE), /* TokenSource */
sizeof(TOKEN_TYPE), /* TokenType */
sizeof(SECURITY_IMPERSONATION_LEVEL), /* TokenImpersonationLevel */
sizeof(TOKEN_STATISTICS), /* TokenStatistics */
0, /* TokenRestrictedSids */
0, /* TokenSessionId */
0, /* TokenGroupsAndPrivileges */
0, /* TokenSessionReference */
0, /* TokenSandBoxInert */
0, /* TokenAuditPolicy */
0, /* TokenOrigin */
0, /* TokenElevationType */
0, /* TokenLinkedToken */
sizeof(TOKEN_ELEVATION), /* TokenElevation */
0, /* TokenHasRestrictions */
0, /* TokenAccessInformation */
0, /* TokenVirtualizationAllowed */
0, /* TokenVirtualizationEnabled */
0, /* TokenIntegrityLevel */
0, /* TokenUIAccess */
0, /* TokenMandatoryPolicy */
0 /* TokenLogonSid */
};
ULONG len = 0;
NTSTATUS status = STATUS_SUCCESS;
TRACE("(%p,%d,%p,%d,%p)\n",
token,tokeninfoclass,tokeninfo,tokeninfolength,retlen);
switch (tokeninfoclass)
{
case TokenSource:
len = sizeof(TOKEN_SOURCE);
break;
case TokenType:
len = sizeof (TOKEN_TYPE);
break;
case TokenImpersonationLevel:
len = sizeof(SECURITY_IMPERSONATION_LEVEL);
break;
case TokenStatistics:
len = sizeof(TOKEN_STATISTICS);
break;
default:
len = 0;
}
if (tokeninfoclass < MaxTokenInfoClass)
len = info_len[tokeninfoclass];
if (retlen) *retlen = len;
......@@ -489,6 +507,13 @@ NTSTATUS WINAPI NtQueryInformationToken(
}
SERVER_END_REQ;
break;
case TokenElevation:
{
TOKEN_ELEVATION *elevation = tokeninfo;
FIXME("QueryInformationToken( ..., TokenElevation, ...) semi-stub\n");
elevation->TokenIsElevated = TRUE;
}
break;
default:
{
ERR("Unhandled Token Information class %d!\n", tokeninfoclass);
......
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