ObCreateObject should return an existing named object if one already
exist.
Modified: trunk/reactos/ntoskrnl/ob/object.c
_____
Modified: trunk/reactos/ntoskrnl/ob/object.c
--- trunk/reactos/ntoskrnl/ob/object.c 2005-04-08 22:19:39 UTC (rev
14559)
+++ trunk/reactos/ntoskrnl/ob/object.c 2005-04-09 09:37:32 UTC (rev
14560)
@@ -712,8 +712,13 @@
if (ParentHeader &&
RemainingPath.Buffer == NULL)
{
- ObDereferenceObject(Parent);
- return STATUS_OBJECT_NAME_COLLISION;
+ if (ParentHeader->ObjectType != Type)
+ {
+ ObDereferenceObject(Parent);
+ return STATUS_OBJECT_NAME_COLLISION;
+ }
+ *Object = Parent;
+ return STATUS_OBJECT_EXISTS;
}
}
else
Show replies by date