mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
Respect OBJ_OPENIF flag in ObCreateObject
svn path=/trunk/; revision=14596
This commit is contained in:
parent
c568ca436d
commit
63e93fb6ba
2 changed files with 3 additions and 2 deletions
|
@ -60,7 +60,7 @@ ObReferenceObjectByName(PUNICODE_STRING ObjectPath,
|
|||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
ObjectPath,
|
||||
Attributes,
|
||||
Attributes | OBJ_OPENIF,
|
||||
NULL,
|
||||
NULL);
|
||||
Status = ObFindObject(&ObjectAttributes,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue