mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
Make RtlEqualPrefixSid portable
svn path=/trunk/; revision=25648
This commit is contained in:
parent
16112941ac
commit
d0e23d4854
1 changed files with 14 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue