Author: ion
Date: Tue Oct 2 16:05:26 2012
New Revision: 57458
URL:
http://svn.reactos.org/svn/reactos?rev=57458&view=rev
Log:
[RTL]: Fix bugs in SD rewrite, bringing tests back to 73 failures instead of 117 (back to
their normal).
Modified:
trunk/reactos/lib/rtl/sd.c
Modified: trunk/reactos/lib/rtl/sd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/sd.c?rev=57458&…
==============================================================================
--- trunk/reactos/lib/rtl/sd.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/sd.c [iso-8859-1] Tue Oct 2 16:05:26 2012
@@ -147,6 +147,7 @@
/* Setup an empty SD */
RtlZeroMemory(SecurityDescriptor, sizeof(*SecurityDescriptor));
SecurityDescriptor->Revision = SECURITY_DESCRIPTOR_REVISION;
+ SecurityDescriptor->Control = SE_SELF_RELATIVE;
/* All good */
return STATUS_SUCCESS;
@@ -560,14 +561,14 @@
if (Sd->Revision != SECURITY_DESCRIPTOR_REVISION) return STATUS_UNKNOWN_REVISION;
/* Mask out flags which are not attributes */
- Control &= ~SE_DACL_UNTRUSTED |
- SE_SERVER_SECURITY |
- SE_DACL_AUTO_INHERIT_REQ |
- SE_SACL_AUTO_INHERIT_REQ |
- SE_DACL_AUTO_INHERITED |
- SE_SACL_AUTO_INHERITED |
- SE_DACL_PROTECTED |
- SE_SACL_PROTECTED;
+ Control &= SE_DACL_UNTRUSTED |
+ SE_SERVER_SECURITY |
+ SE_DACL_AUTO_INHERIT_REQ |
+ SE_SACL_AUTO_INHERIT_REQ |
+ SE_DACL_AUTO_INHERITED |
+ SE_SACL_AUTO_INHERITED |
+ SE_DACL_PROTECTED |
+ SE_SACL_PROTECTED;
/* Call the newer API */
return RtlSetControlSecurityDescriptor(SecurityDescriptor, Control, Control);
@@ -1153,7 +1154,7 @@
}
/* Read the group, check if it's valid and if the buffer contains it */
- Group = (PSID)((ULONG_PTR)Sd->Owner + (ULONG_PTR)Sd);
+ Group = (PSID)((ULONG_PTR)Sd->Group + (ULONG_PTR)Sd);
if (!RtlValidSid(Group) || (Length < RtlLengthSid(Group))) return FALSE;
}
else if (RequiredInformation & GROUP_SECURITY_INFORMATION)