ObCreateObject should return an existing named object if one already exist.

svn path=/trunk/; revision=14560
This commit is contained in:
Hartmut Birr 2005-04-09 09:37:32 +00:00
parent 366a70a52a
commit 6256db0836

View file

@ -712,8 +712,13 @@ ObCreateObject (IN KPROCESSOR_MODE ObjectAttributesAccessMode OPTIONAL,
if (ParentHeader && if (ParentHeader &&
RemainingPath.Buffer == NULL) RemainingPath.Buffer == NULL)
{ {
ObDereferenceObject(Parent); if (ParentHeader->ObjectType != Type)
return STATUS_OBJECT_NAME_COLLISION; {
ObDereferenceObject(Parent);
return STATUS_OBJECT_NAME_COLLISION;
}
*Object = Parent;
return STATUS_OBJECT_EXISTS;
} }
} }
else else