mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
Respect OBJ_OPENIF flag in ObCreateObject
svn path=/trunk/; revision=14596
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user