diff --git a/reactos/ntoskrnl/ob/namespc.c b/reactos/ntoskrnl/ob/namespc.c index f67794ad08c..99a635c7d1f 100644 --- a/reactos/ntoskrnl/ob/namespc.c +++ b/reactos/ntoskrnl/ob/namespc.c @@ -60,7 +60,7 @@ ObReferenceObjectByName(PUNICODE_STRING ObjectPath, InitializeObjectAttributes(&ObjectAttributes, ObjectPath, - Attributes, + Attributes | OBJ_OPENIF, NULL, NULL); Status = ObFindObject(&ObjectAttributes, diff --git a/reactos/ntoskrnl/ob/object.c b/reactos/ntoskrnl/ob/object.c index 08c36ed50d6..b128e9e981c 100644 --- a/reactos/ntoskrnl/ob/object.c +++ b/reactos/ntoskrnl/ob/object.c @@ -712,7 +712,8 @@ ObCreateObject (IN KPROCESSOR_MODE ObjectAttributesAccessMode OPTIONAL, if (ParentHeader && RemainingPath.Buffer == NULL) { - if (ParentHeader->ObjectType != Type) + if (ParentHeader->ObjectType != Type + || !(ObjectAttributes->Attributes & OBJ_OPENIF)) { ObDereferenceObject(Parent); return STATUS_OBJECT_NAME_COLLISION;