Merge branch 'syscodeinteg' into 'master'

ntdll: Improve NtQuerySystemInformation(SystemCodeIntegrityInformation)

See merge request wine/wine!4833
This commit is contained in:
Dāvis Mosāns (davispuh) 2024-11-19 22:08:48 +00:00
commit 0dc07d1f70

View file

@ -3599,11 +3599,21 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
FIXME("SystemCodeIntegrityInformation, size %u, info %p, stub!\n", (int)size, info);
len = sizeof(SYSTEM_CODEINTEGRITY_INFORMATION);
if (size >= len)
integrity_info->CodeIntegrityOptions = CODEINTEGRITY_OPTION_ENABLED;
else
if (size > 0)
{
if (!info) ret = STATUS_ACCESS_VIOLATION;
else if (size >= len && integrity_info->Length == len)
{
/* proper implementation is probably reading this from registry, see https://learn.microsoft.com/en-us/windows/security/hardware-security/enable-virtualization-based-protection-of-code-integrity */
integrity_info->CodeIntegrityOptions = CODEINTEGRITY_OPTION_ENABLED | CODEINTEGRITY_OPTION_HVCI_IUM_ENABLED;
} else
{
ret = STATUS_INFO_LENGTH_MISMATCH;
}
} else
{
ret = STATUS_INFO_LENGTH_MISMATCH;
}
break;
}