* Check for symbolic-links in ObFindObject.

svn path=/trunk/; revision=3707
This commit is contained in:
Hartmut Birr 2002-11-05 20:51:23 +00:00
parent 95b7092276
commit 3ec57dfda5

View file

@ -1,4 +1,4 @@
/* $Id: object.c,v 1.56 2002/09/08 10:23:39 chorns Exp $ /* $Id: object.c,v 1.57 2002/11/05 20:51:23 hbirr Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -17,6 +17,7 @@
#include <internal/ps.h> #include <internal/ps.h>
#include <internal/id.h> #include <internal/id.h>
#include <internal/ke.h> #include <internal/ke.h>
#include <internal/io.h>
#define NDEBUG #define NDEBUG
#include <internal/debug.h> #include <internal/debug.h>
@ -111,6 +112,7 @@ NTSTATUS ObFindObject(POBJECT_ATTRIBUTES ObjectAttributes,
PWSTR Path; PWSTR Path;
PWSTR current; PWSTR current;
UNICODE_STRING PathString; UNICODE_STRING PathString;
ULONG Attributes;
DPRINT("ObFindObject(ObjectAttributes %x, ReturnedObject %x, " DPRINT("ObFindObject(ObjectAttributes %x, ReturnedObject %x, "
"RemainingPath %x)\n",ObjectAttributes,ReturnedObject,RemainingPath); "RemainingPath %x)\n",ObjectAttributes,ReturnedObject,RemainingPath);
@ -167,6 +169,9 @@ NTSTATUS ObFindObject(POBJECT_ATTRIBUTES ObjectAttributes,
} }
RootObject = CurrentObject; RootObject = CurrentObject;
Attributes = ObjectAttributes->Attributes;
if (ObjectType == IoSymbolicLinkType)
Attributes |= OBJ_OPENLINK;
while (TRUE) while (TRUE)
{ {
@ -185,7 +190,7 @@ NTSTATUS ObFindObject(POBJECT_ATTRIBUTES ObjectAttributes,
&NextObject, &NextObject,
&PathString, &PathString,
&current, &current,
ObjectAttributes->Attributes); Attributes);
if (Status == STATUS_REPARSE) if (Status == STATUS_REPARSE)
{ {
/* reparse the object path */ /* reparse the object path */