Rebase against 3269da9b46eaec8e3ea263fc8ecfcd24d3d8b6e6.

This commit is contained in:
Zebediah Figura 2021-04-08 18:18:17 -05:00
parent 03f7334e65
commit 9319c38de2
4 changed files with 2 additions and 100 deletions

View File

@ -1,81 +0,0 @@
From 2d1f48433946ac413d78bc3e4b0750d26a56b353 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/unix/system.c | 22 ++++++++++++++++++++++
include/winternl.h | 21 +++++++++++++++++++++
2 files changed, 43 insertions(+)
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
index 2b316095f4a..72fd47b6c39 100644
--- a/dlls/ntdll/unix/system.c
+++ b/dlls/ntdll/unix/system.c
@@ -2827,6 +2827,28 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
break;
}
+ case SystemCodeIntegrityInformation:
+ {
+ SYSTEM_CODEINTEGRITY_INFORMATION *scii = info;
+
+ FIXME("SystemCodeIntegrityInformation, size %u, info %p, stub!\n", size, info);
+
+ if (size < sizeof(SYSTEM_CODEINTEGRITY_INFORMATION))
+ {
+ ret = STATUS_INFO_LENGTH_MISMATCH;
+ break;
+ }
+
+ if (!info)
+ {
+ ret = STATUS_ACCESS_VIOLATION;
+ break;
+ }
+
+ scii->CodeIntegrityOptions = CODEINTEGRITY_OPTION_ENABLED;
+ break;
+ }
+
default:
FIXME( "(0x%08x,%p,0x%08x,%p) stub\n", class, info, size, ret_size );
diff --git a/include/winternl.h b/include/winternl.h
index 298ebbc2d36..7632cfcb999 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -1698,6 +1698,27 @@ typedef enum _SYSTEM_INFORMATION_CLASS {
#endif
} 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.30.2

View File

@ -1 +0,0 @@
Fixes: [49192] ntdll: NtQuerySystemInformation support SystemCodeIntegrityInformation

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "ac65e1540960e64ce29e40ec19e4eade8369d520"
echo "3269da9b46eaec8e3ea263fc8ecfcd24d3d8b6e6"
}
# Show version information
@ -175,7 +175,6 @@ patch_enable_all ()
enable_ntdll_RtlQueryProcessPlaceholderCompatibilityMode="$1"
enable_ntdll_Serial_Port_Detection="$1"
enable_ntdll_Syscall_Emulation="$1"
enable_ntdll_SystemCodeIntegrityInformation="$1"
enable_ntdll_WRITECOPY="$1"
enable_ntdll_Zero_mod_name="$1"
enable_ntdll_aarch_TEB="$1"
@ -583,9 +582,6 @@ patch_enable ()
ntdll-Syscall_Emulation)
enable_ntdll_Syscall_Emulation="$2"
;;
ntdll-SystemCodeIntegrityInformation)
enable_ntdll_SystemCodeIntegrityInformation="$2"
;;
ntdll-WRITECOPY)
enable_ntdll_WRITECOPY="$2"
;;
@ -3106,18 +3102,6 @@ if test "$enable_ntdll_Syscall_Emulation" -eq 1; then
patch_apply ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch
fi
# Patchset ntdll-SystemCodeIntegrityInformation
# |
# | This patchset fixes the following Wine bugs:
# | * [#49192] ntdll: NtQuerySystemInformation support SystemCodeIntegrityInformation
# |
# | Modified files:
# | * dlls/ntdll/unix/system.c, include/winternl.h
# |
if test "$enable_ntdll_SystemCodeIntegrityInformation" -eq 1; then
patch_apply ntdll-SystemCodeIntegrityInformation/0001-ntdll-NtQuerySystemInformation-support-SystemCodeInt.patch
fi
# Patchset ntdll-Zero_mod_name
# |
# | Modified files:

View File

@ -1 +1 @@
ac65e1540960e64ce29e40ec19e4eade8369d520
3269da9b46eaec8e3ea263fc8ecfcd24d3d8b6e6