From 00de4984f67296921db819ebadb251650cc5f942 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Mon, 30 Jul 2018 12:21:41 +1000 Subject: [PATCH] Added ntdll-NtQueryInformationProcess-ProcessCookie patchset --- ...rocessCookie-in-NtQueryInformationPr.patch | 35 +++++++++++++++++++ .../definition | 1 + patches/patchinstall.sh | 19 ++++++++++ 3 files changed, 55 insertions(+) create mode 100644 patches/ntdll-NtQueryInformationProcess-ProcessCookie/0001-ntdll-Stub-for-ProcessCookie-in-NtQueryInformationPr.patch create mode 100644 patches/ntdll-NtQueryInformationProcess-ProcessCookie/definition diff --git a/patches/ntdll-NtQueryInformationProcess-ProcessCookie/0001-ntdll-Stub-for-ProcessCookie-in-NtQueryInformationPr.patch b/patches/ntdll-NtQueryInformationProcess-ProcessCookie/0001-ntdll-Stub-for-ProcessCookie-in-NtQueryInformationPr.patch new file mode 100644 index 00000000..e4851f8a --- /dev/null +++ b/patches/ntdll-NtQueryInformationProcess-ProcessCookie/0001-ntdll-Stub-for-ProcessCookie-in-NtQueryInformationPr.patch @@ -0,0 +1,35 @@ +From 66039784d648883d899f33278fd8e31f946edb05 Mon Sep 17 00:00:00 2001 +From: Andrew Wesie +Date: Thu, 26 Jul 2018 11:34:32 -0500 +Subject: [PATCH] ntdll: Stub for ProcessCookie in NtQueryInformationProcess. + +--- + dlls/ntdll/process.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c +index b299287..4e08c62 100644 +--- a/dlls/ntdll/process.c ++++ b/dlls/ntdll/process.c +@@ -572,6 +572,18 @@ NTSTATUS WINAPI NtQueryInformationProcess( + else + ret = STATUS_INFO_LENGTH_MISMATCH; + break; ++ case ProcessCookie: ++ FIXME("(%p,info_class=%d,%p,0x%08x,%p) stub\n", ++ ProcessHandle,ProcessInformationClass, ++ ProcessInformation,ProcessInformationLength, ++ ReturnLength); ++ ++ len = sizeof(ULONG); ++ if (ProcessInformationLength == len) ++ *(ULONG *)ProcessInformation = 0; ++ else ++ ret = STATUS_INFO_LENGTH_MISMATCH; ++ break; + default: + FIXME("(%p,info_class=%d,%p,0x%08x,%p) Unknown information class\n", + ProcessHandle,ProcessInformationClass, +-- +1.9.1 + diff --git a/patches/ntdll-NtQueryInformationProcess-ProcessCookie/definition b/patches/ntdll-NtQueryInformationProcess-ProcessCookie/definition new file mode 100644 index 00000000..79281ad6 --- /dev/null +++ b/patches/ntdll-NtQueryInformationProcess-ProcessCookie/definition @@ -0,0 +1 @@ +Fixes: [45327] Added support ProcessCookie in NtQueryInformationProcess diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 0a4f6a18..12b6ad51 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -225,6 +225,7 @@ patch_enable_all () enable_ntdll_NtContinue="$1" enable_ntdll_NtDevicePath="$1" enable_ntdll_NtQueryEaFile="$1" + enable_ntdll_NtQueryInformationProcess_ProcessCookie="$1" enable_ntdll_NtQuerySection="$1" enable_ntdll_NtQueryVirtualMemory="$1" enable_ntdll_NtSetLdtEntries="$1" @@ -851,6 +852,9 @@ patch_enable () ntdll-NtQueryEaFile) enable_ntdll_NtQueryEaFile="$2" ;; + ntdll-NtQueryInformationProcess-ProcessCookie) + enable_ntdll_NtQueryInformationProcess_ProcessCookie="$2" + ;; ntdll-NtQuerySection) enable_ntdll_NtQuerySection="$2" ;; @@ -5105,6 +5109,21 @@ if test "$enable_ntdll_NtDevicePath" -eq 1; then ) >> "$patchlist" fi +# Patchset ntdll-NtQueryInformationProcess-ProcessCookie +# | +# | This patchset fixes the following Wine bugs: +# | * [#45327] Add RtlSetUnhandledExceptionFilter stub +# | +# | Modified files: +# | * dlls/ntdll/process.c +# | +if test "$enable_ntdll_NtQueryInformationProcess_ProcessCookie" -eq 1; then + patch_apply ntdll-NtQueryInformationProcess-ProcessCookie/0001-ntdll-Stub-for-ProcessCookie-in-NtQueryInformationPr.patch + ( + printf '%s\n' '+ { "Andrew Wesie", "ntdll: Stub for ProcessCookie in NtQueryInformationProcess.", 1 },'; + ) >> "$patchlist" +fi + # Patchset ntdll-NtQuerySection # | # | Modified files: