[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
This commit is contained in:
Thomas Faber 2016-10-15 20:16:47 +00:00
parent 0d36dcef60
commit 85fa521728

View file

@ -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)
{