Author: tkreuzer
Date: Fri Jan 17 23:13:38 2014
New Revision: 61663
URL:
http://svn.reactos.org/svn/reactos?rev=61663&view=rev
Log:
[NTOSKRNL]
Slightly improve SeCaptureSidAndAttributesArray
Modified:
trunk/reactos/ntoskrnl/se/sid.c
Modified: trunk/reactos/ntoskrnl/se/sid.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/sid.c?rev=6166…
==============================================================================
--- trunk/reactos/ntoskrnl/se/sid.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/se/sid.c [iso-8859-1] Fri Jan 17 23:13:38 2014
@@ -503,9 +503,6 @@
}
else
{
- /* First copy the source array */
- RtlCopyMemory(SidAndAttributes, SrcSidAndAttributes, ArraySize);
-
/* The rest of the data starts after the array */
CurrentDest = (PUCHAR)SidAndAttributes;
CurrentDest += ALIGN_UP_BY(ArraySize, sizeof(ULONG));
@@ -516,6 +513,9 @@
/* Get the SID and it's length */
Sid = SrcSidAndAttributes[i].Sid;
SidLength = RtlLengthRequiredSid(Sid->SubAuthorityCount);
+
+ /* Copy attributes */
+ SidAndAttributes[i].Attributes = SrcSidAndAttributes[i].Attributes;
/* Copy the SID to the current destination address */
SidAndAttributes[i].Sid = (PSID)CurrentDest;