Author: ion Date: Thu Sep 24 03:32:08 2015 New Revision: 69341
URL: http://svn.reactos.org/svn/reactos?rev=69341&view=rev Log: [NTOSKRNL]: Now that OBJ_VALID_ATTRIBUTES doesn't include all attributes, fix the kernel parameter checks.
Modified: trunk/reactos/ntoskrnl/ob/oblife.c
Modified: trunk/reactos/ntoskrnl/ob/oblife.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/oblife.c?rev=69... ============================================================================== --- trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] Thu Sep 24 03:32:08 2015 @@ -474,7 +474,7 @@
/* Validate the Size and Attributes */ if ((ObjectAttributes->Length != sizeof(OBJECT_ATTRIBUTES)) || - (ObjectAttributes->Attributes & ~OBJ_VALID_ATTRIBUTES)) + (ObjectAttributes->Attributes & ~OBJ_VALID_KERNEL_ATTRIBUTES)) { /* Invalid combination, fail */ _SEH2_YIELD(return STATUS_INVALID_PARAMETER); @@ -482,7 +482,7 @@
/* Set some Create Info and do not allow user-mode kernel handles */ ObjectCreateInfo->RootDirectory = ObjectAttributes->RootDirectory; - ObjectCreateInfo->Attributes = ObjectAttributes->Attributes & OBJ_VALID_ATTRIBUTES; + ObjectCreateInfo->Attributes = ObjectAttributes->Attributes & OBJ_VALID_KERNEL_ATTRIBUTES; if (CreatorMode != KernelMode) ObjectCreateInfo->Attributes &= ~OBJ_KERNEL_HANDLE; LocalObjectName = ObjectAttributes->ObjectName; SecurityDescriptor = ObjectAttributes->SecurityDescriptor; @@ -1041,7 +1041,7 @@ (TypeName->Length % sizeof(WCHAR)) || !(ObjectTypeInitializer) || (ObjectTypeInitializer->Length != sizeof(*ObjectTypeInitializer)) || - (ObjectTypeInitializer->InvalidAttributes & ~OBJ_VALID_ATTRIBUTES) || + (ObjectTypeInitializer->InvalidAttributes & ~OBJ_VALID_KERNEL_ATTRIBUTES) || (ObjectTypeInitializer->MaintainHandleCount && (!(ObjectTypeInitializer->OpenProcedure) && !ObjectTypeInitializer->CloseProcedure)) ||