Make RtlEqualPrefixSid portable

svn path=/trunk/; revision=25648
This commit is contained in:
Thomas Bluemel 2007-01-27 14:06:01 +00:00
parent 16112941ac
commit d0e23d4854

View file

@ -303,14 +303,22 @@ BOOLEAN NTAPI
RtlEqualPrefixSid(IN PSID Sid1_,
IN PSID Sid2_)
{
PISID Sid1 = Sid1_;
PISID Sid2 = Sid2_;
PISID Sid1 = Sid1_;
PISID Sid2 = Sid2_;
SIZE_T SidLen;
PAGED_CODE_RTL();
PAGED_CODE_RTL();
return(Sid1->SubAuthorityCount == Sid2->SubAuthorityCount &&
!RtlCompareMemory(Sid1, Sid2,
(Sid1->SubAuthorityCount - 1) * sizeof(DWORD) + 8));
if (Sid1->SubAuthorityCount == Sid2->SubAuthorityCount)
{
SidLen = FIELD_OFFSET(SID,
SubAuthority[Sid1->SubAuthorityCount]);
return RtlCompareMemory(Sid1,
Sid2,
SidLen) == SidLen;
}
return FALSE;
}