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

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