Respect OBJ_OPENIF flag in ObCreateObject
Modified: trunk/reactos/ntoskrnl/ob/namespc.c
Modified: trunk/reactos/ntoskrnl/ob/object.c

Modified: trunk/reactos/ntoskrnl/ob/namespc.c
--- trunk/reactos/ntoskrnl/ob/namespc.c	2005-04-11 22:37:46 UTC (rev 14595)
+++ trunk/reactos/ntoskrnl/ob/namespc.c	2005-04-11 22:38:05 UTC (rev 14596)
@@ -60,7 +60,7 @@
 
    InitializeObjectAttributes(&ObjectAttributes,
 			      ObjectPath,
-			      Attributes,
+			      Attributes | OBJ_OPENIF,
 			      NULL,
 			      NULL);
    Status = ObFindObject(&ObjectAttributes,

Modified: trunk/reactos/ntoskrnl/ob/object.c
--- trunk/reactos/ntoskrnl/ob/object.c	2005-04-11 22:37:46 UTC (rev 14595)
+++ trunk/reactos/ntoskrnl/ob/object.c	2005-04-11 22:38:05 UTC (rev 14596)
@@ -712,7 +712,8 @@
       if (ParentHeader &&
 	  RemainingPath.Buffer == NULL)
         {
-	  if (ParentHeader->ObjectType != Type)
+	  if (ParentHeader->ObjectType != Type
+	  	|| !(ObjectAttributes->Attributes & OBJ_OPENIF))
 	    {
               ObDereferenceObject(Parent);
 	      return STATUS_OBJECT_NAME_COLLISION;