Author: tkreuzer Date: Wed Apr 18 11:27:03 2012 New Revision: 56356
URL: http://svn.reactos.org/svn/reactos?rev=56356&view=rev Log: [NTOSKRNL] Fix SepGet*FromDescriptor, returning NULL, when the relative offset is 0. Fixes VMware tools installer.
Modified: trunk/reactos/ntoskrnl/se/sd.c
Modified: trunk/reactos/ntoskrnl/se/sd.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/sd.c?rev=56356&... ============================================================================== --- trunk/reactos/ntoskrnl/se/sd.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/sd.c [iso-8859-1] Wed Apr 18 11:27:03 2012 @@ -38,6 +38,7 @@ if (Descriptor->Control & SE_SELF_RELATIVE) { SdRel = (PISECURITY_DESCRIPTOR_RELATIVE)Descriptor; + if (!SdRel->Group) return NULL; return (PSID)((ULONG_PTR)Descriptor + SdRel->Group); } else @@ -56,6 +57,7 @@ if (Descriptor->Control & SE_SELF_RELATIVE) { SdRel = (PISECURITY_DESCRIPTOR_RELATIVE)Descriptor; + if (!SdRel->Owner) return NULL; return (PSID)((ULONG_PTR)Descriptor + SdRel->Owner); } else @@ -74,6 +76,7 @@ if (Descriptor->Control & SE_SELF_RELATIVE) { SdRel = (PISECURITY_DESCRIPTOR_RELATIVE)Descriptor; + if (!SdRel->Dacl) return NULL; return (PACL)((ULONG_PTR)Descriptor + SdRel->Dacl); } else @@ -92,6 +95,7 @@ if (Descriptor->Control & SE_SELF_RELATIVE) { SdRel = (PISECURITY_DESCRIPTOR_RELATIVE)Descriptor; + if (!SdRel->Sacl) return NULL; return (PACL)((ULONG_PTR)Descriptor + SdRel->Sacl); } else