[PATCH v2] ntdll: NtQuerySystemInformation support SystemCodeIntegrityInformation
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Sat May 23 03:12:40 CDT 2020
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49192
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at 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 978919146c..a9b2e24781 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -3062,6 +3062,27 @@ NTSTATUS WINAPI NtQuerySystemInformation(
}
}
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 e197a55a27..aa88929906 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -971,10 +971,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
More information about the wine-devel
mailing list