mirror of
https://github.com/reactos/reactos.git
synced 2024-08-30 15:18:33 +00:00
implemented the TokenRestrictedSids information class for NtQueryInformationToken, however restricted SIDs are not yet supported!
svn path=/trunk/; revision=15962
This commit is contained in:
parent
785eb54c6a
commit
acfd0635dd
|
@ -1047,9 +1047,49 @@ NtQueryInformationToken(IN HANDLE TokenHandle,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TokenRestrictedSids:
|
case TokenRestrictedSids:
|
||||||
DPRINT1("NtQueryInformationToken(TokenRestrictedSids) not implemented\n");
|
{
|
||||||
Status = STATUS_NOT_IMPLEMENTED;
|
PTOKEN_GROUPS tg = (PTOKEN_GROUPS)TokenInformation;
|
||||||
|
|
||||||
|
DPRINT("NtQueryInformationToken(TokenRestrictedSids)\n");
|
||||||
|
RequiredLength = sizeof(tg->GroupCount) +
|
||||||
|
RtlLengthSidAndAttributes(Token->RestrictedSidCount, Token->RestrictedSids);
|
||||||
|
|
||||||
|
_SEH_TRY
|
||||||
|
{
|
||||||
|
if(TokenInformationLength >= RequiredLength)
|
||||||
|
{
|
||||||
|
ULONG SidLen = RequiredLength - sizeof(tg->GroupCount) -
|
||||||
|
(Token->RestrictedSidCount * sizeof(SID_AND_ATTRIBUTES));
|
||||||
|
PSID_AND_ATTRIBUTES Sid = (PSID_AND_ATTRIBUTES)((ULONG_PTR)TokenInformation + sizeof(tg->GroupCount) +
|
||||||
|
(Token->RestrictedSidCount * sizeof(SID_AND_ATTRIBUTES)));
|
||||||
|
|
||||||
|
tg->GroupCount = Token->RestrictedSidCount;
|
||||||
|
Status = RtlCopySidAndAttributesArray(Token->RestrictedSidCount,
|
||||||
|
Token->RestrictedSids,
|
||||||
|
SidLen,
|
||||||
|
&tg->Groups[0],
|
||||||
|
(PSID)Sid,
|
||||||
|
&Unused.Ptr,
|
||||||
|
&Unused.Ulong);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Status = STATUS_BUFFER_TOO_SMALL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(ReturnLength != NULL)
|
||||||
|
{
|
||||||
|
*ReturnLength = RequiredLength;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
Status = _SEH_GetExceptionCode();
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case TokenSandBoxInert:
|
case TokenSandBoxInert:
|
||||||
DPRINT1("NtQueryInformationToken(TokenSandboxInert) not implemented\n");
|
DPRINT1("NtQueryInformationToken(TokenSandboxInert) not implemented\n");
|
||||||
|
|
Loading…
Reference in a new issue