From a5a402a003fd9512b065f67ce8930ff7cee96d67 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 18 Dec 2020 09:44:36 +1100 Subject: [PATCH] Added ntdll-RtlQueryProcessPlaceholderCompatibilityMode patchset --- ...or-RtlQueryProcessPlaceholderCompati.patch | 93 +++++++++++++++++++ .../definition | 1 + patches/patchinstall.sh | 16 ++++ 3 files changed, 110 insertions(+) create mode 100644 patches/ntdll-RtlQueryProcessPlaceholderCompatibilityMode/0001-ntdll-Add-stub-for-RtlQueryProcessPlaceholderCompati.patch create mode 100644 patches/ntdll-RtlQueryProcessPlaceholderCompatibilityMode/definition diff --git a/patches/ntdll-RtlQueryProcessPlaceholderCompatibilityMode/0001-ntdll-Add-stub-for-RtlQueryProcessPlaceholderCompati.patch b/patches/ntdll-RtlQueryProcessPlaceholderCompatibilityMode/0001-ntdll-Add-stub-for-RtlQueryProcessPlaceholderCompati.patch new file mode 100644 index 00000000..8eecdb6d --- /dev/null +++ b/patches/ntdll-RtlQueryProcessPlaceholderCompatibilityMode/0001-ntdll-Add-stub-for-RtlQueryProcessPlaceholderCompati.patch @@ -0,0 +1,93 @@ +From b8f9756bb692fb65a36b579aa99780cc030d9aaf Mon Sep 17 00:00:00 2001 +From: Louis Lenders +Date: Sun, 18 Oct 2020 11:59:43 +0200 +Subject: [PATCH] ntdll: Add stub for + RtlQueryProcessPlaceholderCompatibilityMode + +Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50026 + +Signed-off-by: Louis Lenders +--- + dlls/ntdll/ntdll.spec | 1 + + dlls/ntdll/rtl.c | 10 ++++++++++ + dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 1 + + include/ddk/ntifs.h | 8 ++++++++ + 4 files changed, 20 insertions(+) + +diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec +index b9acb120844..10887002d62 100644 +--- a/dlls/ntdll/ntdll.spec ++++ b/dlls/ntdll/ntdll.spec +@@ -897,6 +897,7 @@ + @ stdcall RtlQueryProcessDebugInformation(long long ptr) + @ stub RtlQueryProcessHeapInformation + @ stub RtlQueryProcessLockInformation ++@ stdcall RtlQueryProcessPlaceholderCompatibilityMode() + @ stub RtlQueryProperties + @ stub RtlQueryPropertyNames + @ stub RtlQueryPropertySet +diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c +index cf21c980a45..d7740a7a044 100644 +--- a/dlls/ntdll/rtl.c ++++ b/dlls/ntdll/rtl.c +@@ -37,6 +37,7 @@ + #include "ntdll_misc.h" + #include "in6addr.h" + #include "ddk/ntddk.h" ++#include "ddk/ntifs.h" + + WINE_DEFAULT_DEBUG_CHANNEL(ntdll); + WINE_DECLARE_DEBUG_CHANNEL(debugstr); +@@ -2165,3 +2166,12 @@ NTSTATUS WINAPI RtlQueryPackageIdentity(HANDLE token, WCHAR *fullname, SIZE_T *f + FIXME("(%p, %p, %p, %p, %p, %p): stub\n", token, fullname, fullname_size, appid, appid_size, packaged); + return STATUS_NOT_FOUND; + } ++ ++/********************************************************************* ++ * RtlQueryProcessPlaceholderCompatibilityMode [NTDLL.@] ++ */ ++char WINAPI RtlQueryProcessPlaceholderCompatibilityMode(void) ++{ ++ FIXME("stub\n"); ++ return PHCM_APPLICATION_DEFAULT; ++} +diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +index 6ac70c718f1..cbb49d0ed8d 100644 +--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec ++++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +@@ -1212,6 +1212,7 @@ + @ stdcall RtlQueryDynamicTimeZoneInformation(ptr) + @ stdcall RtlQueryInformationAcl(ptr ptr long long) + @ stdcall RtlQueryPackageIdentity(long ptr ptr ptr ptr ptr) ++@ stdcall RtlQueryProcessPlaceholderCompatibilityMode() ntdll.RtlQueryProcessPlaceholderCompatibilityMode + @ stdcall RtlQueryRegistryValues(long ptr ptr ptr ptr) + @ stdcall RtlQueryTimeZoneInformation(ptr) + @ stdcall -norelay RtlRaiseException(ptr) +diff --git a/include/ddk/ntifs.h b/include/ddk/ntifs.h +index 73d602595c4..a9cc753d7e4 100644 +--- a/include/ddk/ntifs.h ++++ b/include/ddk/ntifs.h +@@ -21,6 +21,13 @@ + + #include "ntddk.h" + ++#define PHCM_ERROR_INVALID_PARAMETER (char)-1 ++#define PHCM_ERROR_NO_TEB (char)-2 ++#define PHCM_APPLICATION_DEFAULT (char)0 ++#define PHCM_DISGUISE_PLACEHOLDERS (char)1 ++#define PHCM_EXPOSE_PLACEHOLDERS (char)2 ++#define PHCM_MAX (char)2 ++ + typedef struct _EX_PUSH_LOCK EX_PUSH_LOCK, *PEX_PUSH_LOCK; + + typedef enum _FS_FILTER_SECTION_SYNC_TYPE +@@ -140,5 +147,6 @@ BOOLEAN WINAPI PsIsSystemThread(PETHREAD); + NTSTATUS WINAPI PsLookupProcessByProcessId(HANDLE,PEPROCESS*); + NTSTATUS WINAPI PsLookupThreadByThreadId(HANDLE,PETHREAD*); + void WINAPI PsRevertToSelf(void); ++char WINAPI RtlQueryProcessPlaceholderCompatibilityMode(void); + + #endif +-- +2.29.2 + diff --git a/patches/ntdll-RtlQueryProcessPlaceholderCompatibilityMode/definition b/patches/ntdll-RtlQueryProcessPlaceholderCompatibilityMode/definition new file mode 100644 index 00000000..ba806e8b --- /dev/null +++ b/patches/ntdll-RtlQueryProcessPlaceholderCompatibilityMode/definition @@ -0,0 +1 @@ +Fixes: [50026]: ntdll: Add stub for RtlQueryProcessPlaceholderCompatibilityMode diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index ec56c409..f3ed0fdf 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -179,6 +179,7 @@ patch_enable_all () enable_ntdll_Pipe_SpecialCharacters="$1" enable_ntdll_ProcessQuotaLimits="$1" enable_ntdll_RtlQueryPackageIdentity="$1" + enable_ntdll_RtlQueryProcessPlaceholderCompatibilityMode="$1" enable_ntdll_RtlQueryRegistryValuesEx="$1" enable_ntdll_Serial_Port_Detection="$1" enable_ntdll_Status_Mapping="$1" @@ -623,6 +624,9 @@ patch_enable () ntdll-RtlQueryPackageIdentity) enable_ntdll_RtlQueryPackageIdentity="$2" ;; + ntdll-RtlQueryProcessPlaceholderCompatibilityMode) + enable_ntdll_RtlQueryProcessPlaceholderCompatibilityMode="$2" + ;; ntdll-RtlQueryRegistryValuesEx) enable_ntdll_RtlQueryRegistryValuesEx="$2" ;; @@ -3341,6 +3345,18 @@ if test "$enable_ntdll_RtlQueryPackageIdentity" -eq 1; then patch_apply ntdll-RtlQueryPackageIdentity/0003-ntdll-tests-Add-basic-tests-for-RtlQueryPackageIdent.patch fi +# Patchset ntdll-RtlQueryProcessPlaceholderCompatibilityMode +# | +# | This patchset fixes the following Wine bugs: +# | * [#50026] : ntdll: Add stub for RtlQueryProcessPlaceholderCompatibilityMode +# | +# | Modified files: +# | * dlls/ntdll/ntdll.spec, dlls/ntdll/rtl.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec, include/ddk/ntifs.h +# | +if test "$enable_ntdll_RtlQueryProcessPlaceholderCompatibilityMode" -eq 1; then + patch_apply ntdll-RtlQueryProcessPlaceholderCompatibilityMode/0001-ntdll-Add-stub-for-RtlQueryProcessPlaceholderCompati.patch +fi + # Patchset ntdll-RtlQueryRegistryValuesEx # | # | This patchset fixes the following Wine bugs: