[NTOSKRNL] Implement ObIsLUIDDeviceMapsEnabled and call it in NtQueryInformationProcess
[reactos.git] / ntoskrnl / ob / obdir.c
index a4a2a60..f8e3a36 100644 (file)
@@ -17,8 +17,7 @@
 #define NDEBUG
 #include <debug.h>
 
-BOOLEAN ObpLUIDDeviceMapsEnabled;
-POBJECT_TYPE ObDirectoryType = NULL;
+POBJECT_TYPE ObpDirectoryObjectType = NULL;
 
 /* PRIVATE FUNCTIONS ******************************************************/
 
@@ -60,7 +59,7 @@ ObpInsertEntryDirectory(IN POBJECT_DIRECTORY Parent,
         (Parent != Context->Directory))
     {
         /* Invalid context */
-        DPRINT1("OB: ObpInsertEntryDirectory - invalid context %p %ld\n",
+        DPRINT1("OB: ObpInsertEntryDirectory - invalid context %p %u\n",
                 Context, Context->DirectoryLocked);
         ASSERT(FALSE);
         return FALSE;
@@ -141,7 +140,7 @@ ObpLookupEntryDirectory(IN POBJECT_DIRECTORY Directory,
     PAGED_CODE();
 
     /* Check if we should search the shadow directory */
-    if (!ObpLUIDDeviceMapsEnabled) SearchShadow = FALSE;
+    if (ObpLUIDDeviceMapsEnabled == 0) SearchShadow = FALSE;
 
     /* Fail if we don't have a directory or name */
     if (!(Directory) || !(Name)) goto Quickie;
@@ -383,7 +382,7 @@ NtOpenDirectoryObject(OUT PHANDLE DirectoryHandle,
 
     /* Open the directory object */
     Status = ObOpenObjectByName(ObjectAttributes,
-                                ObDirectoryType,
+                                ObpDirectoryObjectType,
                                 PreviousMode,
                                 NULL,
                                 DesiredAccess,
@@ -520,7 +519,7 @@ NtQueryDirectoryObject(IN HANDLE DirectoryHandle,
     /* Get a reference to directory */
     Status = ObReferenceObjectByHandle(DirectoryHandle,
                                        DIRECTORY_QUERY,
-                                       ObDirectoryType,
+                                       ObpDirectoryObjectType,
                                        PreviousMode,
                                        (PVOID*)&Directory,
                                        NULL);
@@ -756,7 +755,7 @@ NtCreateDirectoryObject(OUT PHANDLE DirectoryHandle,
 
     /* Create the object */
     Status = ObCreateObject(PreviousMode,
-                            ObDirectoryType,
+                            ObpDirectoryObjectType,
                             ObjectAttributes,
                             PreviousMode,
                             NULL,