mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Added ntdll-SystemCodeIntegrityInformation patchset
This commit is contained in:
parent
7f9b426cb9
commit
bf85255a61
@ -0,0 +1,85 @@
|
||||
From 7421907b2ecc21493308aa31478b6828f4341e29 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 22 May 2020 16:37:37 +1000
|
||||
Subject: [PATCH] ntdll: NtQuerySystemInformation support
|
||||
SystemCodeIntegrityInformation
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49192
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/ntdll/nt.c | 21 +++++++++++++++++++++
|
||||
include/winternl.h | 22 ++++++++++++++++++++++
|
||||
2 files changed, 43 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
|
||||
index 1d31f80a5f55..99b0d8dc0921 100644
|
||||
--- a/dlls/ntdll/nt.c
|
||||
+++ b/dlls/ntdll/nt.c
|
||||
@@ -3179,6 +3179,27 @@ NTSTATUS WINAPI NtQuerySystemInformation(
|
||||
memset(SystemInformation, 0, Length);
|
||||
ret = STATUS_SUCCESS;
|
||||
break;
|
||||
+ case SystemCodeIntegrityInformation:
|
||||
+ {
|
||||
+ SYSTEM_CODEINTEGRITY_INFORMATION *info = (SYSTEM_CODEINTEGRITY_INFORMATION*)SystemInformation;
|
||||
+
|
||||
+ FIXME("SystemCodeIntegrityInformation, len %u, buffer %p, stub!\n", Length, info);
|
||||
+
|
||||
+ if (Length < sizeof(SYSTEM_CODEINTEGRITY_INFORMATION))
|
||||
+ {
|
||||
+ ret = STATUS_INFO_LENGTH_MISMATCH;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (!SystemInformation)
|
||||
+ {
|
||||
+ ret = STATUS_ACCESS_VIOLATION;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ info->CodeIntegrityOptions = CODEINTEGRITY_OPTION_ENABLED;
|
||||
+ break;
|
||||
+ }
|
||||
default:
|
||||
FIXME("(0x%08x,%p,0x%08x,%p) stub\n",
|
||||
SystemInformationClass,SystemInformation,Length,ResultLength);
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index 640dbe5db354..1ae249c59404 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -972,10 +972,32 @@ typedef enum _SYSTEM_INFORMATION_CLASS {
|
||||
SystemSuperfetchInformation = 79,
|
||||
SystemMemoryListInformation = 80,
|
||||
SystemFileCacheInformationEx = 81,
|
||||
+ SystemCodeIntegrityInformation = 103,
|
||||
SystemLogicalProcessorInformationEx = 107,
|
||||
SystemInformationClassMax
|
||||
} SYSTEM_INFORMATION_CLASS, *PSYSTEM_INFORMATION_CLASS;
|
||||
|
||||
+typedef struct _SYSTEM_CODEINTEGRITY_INFORMATION
|
||||
+{
|
||||
+ ULONG Length;
|
||||
+ ULONG CodeIntegrityOptions;
|
||||
+} SYSTEM_CODEINTEGRITY_INFORMATION, *PSYSTEM_CODEINTEGRITY_INFORMATION;
|
||||
+
|
||||
+#define CODEINTEGRITY_OPTION_ENABLED 0x0001
|
||||
+#define CODEINTEGRITY_OPTION_TESTSIGN 0x0002
|
||||
+#define CODEINTEGRITY_OPTION_UMCI_ENABLED 0x0004
|
||||
+#define CODEINTEGRITY_OPTION_UMCI_AUDITMODE_ENABLED 0x0008
|
||||
+#define CODEINTEGRITY_OPTION_UMCI_EXCLUSIONPATHS_ENABLED 0x0010
|
||||
+#define CODEINTEGRITY_OPTION_TEST_BUILD 0x0020
|
||||
+#define CODEINTEGRITY_OPTION_PREPRODUCTION_BUILD 0x0040
|
||||
+#define CODEINTEGRITY_OPTION_DEBUGMODE_ENABLED 0x0080
|
||||
+#define CODEINTEGRITY_OPTION_FLIGHT_BUILD 0x0100
|
||||
+#define CODEINTEGRITY_OPTION_FLIGHTING_ENABLED 0x0200
|
||||
+#define CODEINTEGRITY_OPTION_HVCI_KMCI_ENABLED 0x0400
|
||||
+#define CODEINTEGRITY_OPTION_HVCI_KMCI_AUDITMODE_ENABLED 0x0800
|
||||
+#define CODEINTEGRITY_OPTION_HVCI_KMCI_STRICTMODE_ENABLED 0x1000
|
||||
+#define CODEINTEGRITY_OPTION_HVCI_IUM_ENABLED 0x2000
|
||||
+
|
||||
typedef enum _THREADINFOCLASS {
|
||||
ThreadBasicInformation = 0,
|
||||
ThreadTimes,
|
||||
--
|
||||
2.26.2
|
||||
|
2
patches/ntdll-SystemCodeIntegrityInformation/definition
Normal file
2
patches/ntdll-SystemCodeIntegrityInformation/definition
Normal file
@ -0,0 +1,2 @@
|
||||
Fixes: [49192] ntdll: NtQuerySystemInformation support SystemCodeIntegrityInformation
|
||||
Depends: ntdll-SystemExtendedProcessInformation
|
@ -197,6 +197,7 @@ patch_enable_all ()
|
||||
enable_ntdll_Serial_Port_Detection="$1"
|
||||
enable_ntdll_Status_Mapping="$1"
|
||||
enable_ntdll_Syscall_Emulation="$1"
|
||||
enable_ntdll_SystemCodeIntegrityInformation="$1"
|
||||
enable_ntdll_SystemExtendedProcessInformation="$1"
|
||||
enable_ntdll_SystemInterruptInformation="$1"
|
||||
enable_ntdll_SystemModuleInformation="$1"
|
||||
@ -692,6 +693,9 @@ patch_enable ()
|
||||
ntdll-Syscall_Emulation)
|
||||
enable_ntdll_Syscall_Emulation="$2"
|
||||
;;
|
||||
ntdll-SystemCodeIntegrityInformation)
|
||||
enable_ntdll_SystemCodeIntegrityInformation="$2"
|
||||
;;
|
||||
ntdll-SystemExtendedProcessInformation)
|
||||
enable_ntdll_SystemExtendedProcessInformation="$2"
|
||||
;;
|
||||
@ -1648,6 +1652,13 @@ if test "$enable_nvcuvid_CUDA_Video_Support" -eq 1; then
|
||||
enable_nvapi_Stub_DLL=1
|
||||
fi
|
||||
|
||||
if test "$enable_ntdll_SystemCodeIntegrityInformation" -eq 1; then
|
||||
if test "$enable_ntdll_SystemExtendedProcessInformation" -gt 1; then
|
||||
abort "Patchset ntdll-SystemExtendedProcessInformation disabled, but ntdll-SystemCodeIntegrityInformation depends on that."
|
||||
fi
|
||||
enable_ntdll_SystemExtendedProcessInformation=1
|
||||
fi
|
||||
|
||||
if test "$enable_ntdll_Syscall_Emulation" -eq 1; then
|
||||
if test "$enable_winebuild_Fake_Dlls" -gt 1; then
|
||||
abort "Patchset winebuild-Fake_Dlls disabled, but ntdll-Syscall_Emulation depends on that."
|
||||
@ -4781,6 +4792,24 @@ if test "$enable_ntdll_SystemExtendedProcessInformation" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-SystemCodeIntegrityInformation
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * ntdll-SystemExtendedProcessInformation
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#49192] ntdll: NtQuerySystemInformation support SystemCodeIntegrityInformation
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ntdll/nt.c, include/winternl.h
|
||||
# |
|
||||
if test "$enable_ntdll_SystemCodeIntegrityInformation" -eq 1; then
|
||||
patch_apply ntdll-SystemCodeIntegrityInformation/0001-ntdll-NtQuerySystemInformation-support-SystemCodeInt.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "ntdll: NtQuerySystemInformation support SystemCodeIntegrityInformation.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-SystemInterruptInformation
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user