From 85fa5217283779aed30b6d4da3611b485905a8ab Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sat, 15 Oct 2016 20:16:47 +0000 Subject: [PATCH] [NTOS:CM] - Ignore the KEY_WOW64_32KEY and KEY_WOW64_64KEY flags in NtOpenKey/NtCreateKey, as shown by tests. CORE-9691 #resolve svn path=/trunk/; revision=72975 --- reactos/ntoskrnl/config/ntapi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/reactos/ntoskrnl/config/ntapi.c b/reactos/ntoskrnl/config/ntapi.c index 7a10d14bfc3..b47f77ffd49 100644 --- a/reactos/ntoskrnl/config/ntapi.c +++ b/reactos/ntoskrnl/config/ntapi.c @@ -39,6 +39,9 @@ NtCreateKey(OUT PHANDLE KeyHandle, ObjectAttributes->ObjectName, ObjectAttributes->RootDirectory, DesiredAccess, CreateOptions); + /* Ignore the WOW64 flag, it's not valid in the kernel */ + DesiredAccess &= ~KEY_WOW64_RES; + /* Check for user-mode caller */ if (PreviousMode != KernelMode) { @@ -126,6 +129,9 @@ NtOpenKey(OUT PHANDLE KeyHandle, DPRINT("NtOpenKey(Path: %wZ, Root %x, Access: %x)\n", ObjectAttributes->ObjectName, ObjectAttributes->RootDirectory, DesiredAccess); + /* Ignore the WOW64 flag, it's not valid in the kernel */ + DesiredAccess &= ~KEY_WOW64_RES; + /* Check for user-mode caller */ if (PreviousMode != KernelMode) {