mirror of
https://github.com/reactos/reactos.git
synced 2025-05-29 14:08:22 +00:00
[NTOSKRNL]
Slightly improve SeCaptureSidAndAttributesArray svn path=/trunk/; revision=61663
This commit is contained in:
parent
b9fdfea09e
commit
208577d8ea
1 changed files with 3 additions and 3 deletions
|
@ -503,9 +503,6 @@ SeCaptureSidAndAttributesArray(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* First copy the source array */
|
|
||||||
RtlCopyMemory(SidAndAttributes, SrcSidAndAttributes, ArraySize);
|
|
||||||
|
|
||||||
/* The rest of the data starts after the array */
|
/* The rest of the data starts after the array */
|
||||||
CurrentDest = (PUCHAR)SidAndAttributes;
|
CurrentDest = (PUCHAR)SidAndAttributes;
|
||||||
CurrentDest += ALIGN_UP_BY(ArraySize, sizeof(ULONG));
|
CurrentDest += ALIGN_UP_BY(ArraySize, sizeof(ULONG));
|
||||||
|
@ -517,6 +514,9 @@ SeCaptureSidAndAttributesArray(
|
||||||
Sid = SrcSidAndAttributes[i].Sid;
|
Sid = SrcSidAndAttributes[i].Sid;
|
||||||
SidLength = RtlLengthRequiredSid(Sid->SubAuthorityCount);
|
SidLength = RtlLengthRequiredSid(Sid->SubAuthorityCount);
|
||||||
|
|
||||||
|
/* Copy attributes */
|
||||||
|
SidAndAttributes[i].Attributes = SrcSidAndAttributes[i].Attributes;
|
||||||
|
|
||||||
/* Copy the SID to the current destination address */
|
/* Copy the SID to the current destination address */
|
||||||
SidAndAttributes[i].Sid = (PSID)CurrentDest;
|
SidAndAttributes[i].Sid = (PSID)CurrentDest;
|
||||||
RtlCopyMemory(CurrentDest, SrcSidAndAttributes[i].Sid, SidLength);
|
RtlCopyMemory(CurrentDest, SrcSidAndAttributes[i].Sid, SidLength);
|
||||||
|
|
Loading…
Reference in a new issue