[BLUE][RTL][VIDEOPRT]
authorThomas Faber <thomas.faber@reactos.org>
Sat, 19 Sep 2015 21:10:11 +0000 (21:10 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sat, 19 Sep 2015 21:10:11 +0000 (21:10 +0000)
- Add missing OBJ_KERNEL_HANDLE
CORE-10207

svn path=/trunk/; revision=69294

reactos/drivers/setup/blue/font.c
reactos/lib/rtl/registry.c
reactos/win32ss/drivers/videoprt/int10.c

index 3adac96..9ab0acd 100644 (file)
@@ -80,7 +80,7 @@ NTSTATUS ExtractFont(UINT32 CodePage, PUCHAR FontBitField)
 
     InitializeObjectAttributes(&ObjectAttributes,
                                &LinkName,
 
     InitializeObjectAttributes(&ObjectAttributes,
                                &LinkName,
-                               OBJ_CASE_INSENSITIVE,
+                               OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
                                NULL,
                                NULL);
 
                                NULL,
                                NULL);
 
index ed158e8..e80e95f 100644 (file)
@@ -523,7 +523,7 @@ RtlpGetRegistryHandle(IN ULONG RelativeTo,
     /* Initialize the object attributes */
     InitializeObjectAttributes(&ObjectAttributes,
                                &KeyName,
     /* Initialize the object attributes */
     InitializeObjectAttributes(&ObjectAttributes,
                                &KeyName,
-                               OBJ_CASE_INSENSITIVE,
+                               OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
                                NULL,
                                NULL);
 
                                NULL,
                                NULL);
 
@@ -742,19 +742,21 @@ RtlFormatCurrentUserKeyPath(OUT PUNICODE_STRING KeyPath)
     PAGED_CODE_RTL();
 
     /* Open the thread token */
     PAGED_CODE_RTL();
 
     /* Open the thread token */
-    Status = ZwOpenThreadToken(NtCurrentThread(),
-                               TOKEN_QUERY,
-                               TRUE,
-                               &TokenHandle);
+    Status = ZwOpenThreadTokenEx(NtCurrentThread(),
+                                 TOKEN_QUERY,
+                                 TRUE,
+                                 OBJ_KERNEL_HANDLE,
+                                 &TokenHandle);
     if (!NT_SUCCESS(Status))
     {
         /* We failed, is it because we don't have a thread token? */
         if (Status != STATUS_NO_TOKEN) return Status;
 
         /* It is, so use the process token */
     if (!NT_SUCCESS(Status))
     {
         /* We failed, is it because we don't have a thread token? */
         if (Status != STATUS_NO_TOKEN) return Status;
 
         /* It is, so use the process token */
-        Status = ZwOpenProcessToken(NtCurrentProcess(),
-                                    TOKEN_QUERY,
-                                    &TokenHandle);
+        Status = ZwOpenProcessTokenEx(NtCurrentProcess(),
+                                      TOKEN_QUERY,
+                                      OBJ_KERNEL_HANDLE,
+                                      &TokenHandle);
         if (!NT_SUCCESS(Status)) return Status;
     }
 
         if (!NT_SUCCESS(Status)) return Status;
     }
 
index 71c377c..14ed492 100644 (file)
@@ -58,7 +58,7 @@ IntInitializeVideoAddressSpace(VOID)
     /* Open the physical memory section */
     InitializeObjectAttributes(&ObjectAttributes,
                                &PhysMemName,
     /* Open the physical memory section */
     InitializeObjectAttributes(&ObjectAttributes,
                                &PhysMemName,
-                               0,
+                               OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
                                NULL,
                                NULL);
     Status = ZwOpenSection(&PhysMemHandle,
                                NULL,
                                NULL);
     Status = ZwOpenSection(&PhysMemHandle,