From 8e8654d76ea99602afe305f6022fad38d1c87d8c Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 21 Oct 2015 03:17:52 +0200 Subject: [PATCH] Added patch to implement stub for ProcessQuotaLimits info class. --- README.md | 3 +- debian/changelog | 1 + ...ata-implementation-for-ProcessQuotaL.patch | 61 +++++++++++++++++++ patches/ntdll-ProcessQuotaLimits/definition | 1 + patches/patchinstall.sh | 16 +++++ 5 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 patches/ntdll-ProcessQuotaLimits/0001-ntdll-Add-fake-data-implementation-for-ProcessQuotaL.patch create mode 100644 patches/ntdll-ProcessQuotaLimits/definition diff --git a/README.md b/README.md index 2bbe097d..420cdfa2 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,9 @@ Wine. All those differences are also documented on the Included bug fixes and improvements ----------------------------------- -**Bug fixes and features included in the next upcoming release [1]:** +**Bug fixes and features included in the next upcoming release [2]:** +* Implement stub for ProcessQuotaLimits info class * Use wrapper function for consolidation callback during unwinding. ([Wine Bug #39449](https://bugs.winehq.org/show_bug.cgi?id=39449)) diff --git a/debian/changelog b/debian/changelog index 34276454..ac56ec35 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ wine-staging (1.7.54) UNRELEASED; urgency=low * Added patch to use wrapper function for consolidation callback during unwinding. + * Added patch to implement stub for ProcessQuotaLimits info class. * Removed patch to implement kernel32.GetPhysicallyInstalledSystemMemory (accepted upstream). * Partially removed patches for ws2_32 TransmitFile (accepted upstream). diff --git a/patches/ntdll-ProcessQuotaLimits/0001-ntdll-Add-fake-data-implementation-for-ProcessQuotaL.patch b/patches/ntdll-ProcessQuotaLimits/0001-ntdll-Add-fake-data-implementation-for-ProcessQuotaL.patch new file mode 100644 index 00000000..1a617f26 --- /dev/null +++ b/patches/ntdll-ProcessQuotaLimits/0001-ntdll-Add-fake-data-implementation-for-ProcessQuotaL.patch @@ -0,0 +1,61 @@ +From c7ed817b9c0b4edf7969ec05f1f3e081a04155d9 Mon Sep 17 00:00:00 2001 +From: Qian Hong +Date: Wed, 21 Oct 2015 06:23:22 +0800 +Subject: ntdll: Add fake data implementation for ProcessQuotaLimits class. + +--- + dlls/ntdll/process.c | 31 ++++++++++++++++++++++++++++++- + 1 file changed, 30 insertions(+), 1 deletion(-) + +diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c +index 37c08f1..088834e 100644 +--- a/dlls/ntdll/process.c ++++ b/dlls/ntdll/process.c +@@ -134,7 +134,6 @@ NTSTATUS WINAPI SYSCALL(NtQueryInformationProcess)( + + switch (ProcessInformationClass) + { +- UNIMPLEMENTED_INFO_CLASS(ProcessQuotaLimits); + UNIMPLEMENTED_INFO_CLASS(ProcessBasePriority); + UNIMPLEMENTED_INFO_CLASS(ProcessRaisePriority); + UNIMPLEMENTED_INFO_CLASS(ProcessExceptionPort); +@@ -199,6 +198,36 @@ NTSTATUS WINAPI SYSCALL(NtQueryInformationProcess)( + } + } + break; ++ case ProcessQuotaLimits: ++ { ++ QUOTA_LIMITS pqli; ++ ++ if (ProcessInformationLength >= sizeof(QUOTA_LIMITS)) ++ { ++ if (!ProcessInformation) ++ ret = STATUS_ACCESS_VIOLATION; ++ else if (!ProcessHandle) ++ ret = STATUS_INVALID_HANDLE; ++ else ++ { ++ /* FIXME : real data */ ++ memset(&pqli, 0, sizeof(QUOTA_LIMITS)); ++ ++ memcpy(ProcessInformation, &pqli, sizeof(QUOTA_LIMITS)); ++ ++ len = sizeof(QUOTA_LIMITS); ++ } ++ ++ if (ProcessInformationLength > sizeof(QUOTA_LIMITS)) ++ ret = STATUS_INFO_LENGTH_MISMATCH; ++ } ++ else ++ { ++ len = sizeof(QUOTA_LIMITS); ++ ret = STATUS_INFO_LENGTH_MISMATCH; ++ } ++ } ++ break; + case ProcessIoCounters: + { + IO_COUNTERS pii; +-- +2.6.1 + diff --git a/patches/ntdll-ProcessQuotaLimits/definition b/patches/ntdll-ProcessQuotaLimits/definition new file mode 100644 index 00000000..d5f5351d --- /dev/null +++ b/patches/ntdll-ProcessQuotaLimits/definition @@ -0,0 +1 @@ +Fixes: Implement stub for ProcessQuotaLimits info class diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 947e1347..3cc51993 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -201,6 +201,7 @@ patch_enable_all () enable_ntdll_NtQuerySection="$1" enable_ntdll_NtSetLdtEntries="$1" enable_ntdll_Pipe_SpecialCharacters="$1" + enable_ntdll_ProcessQuotaLimits="$1" enable_ntdll_RtlIpStringToAddress="$1" enable_ntdll_Stack_Fault="$1" enable_ntdll_Status_Mapping="$1" @@ -699,6 +700,9 @@ patch_enable () ntdll-Pipe_SpecialCharacters) enable_ntdll_Pipe_SpecialCharacters="$2" ;; + ntdll-ProcessQuotaLimits) + enable_ntdll_ProcessQuotaLimits="$2" + ;; ntdll-RtlIpStringToAddress) enable_ntdll_RtlIpStringToAddress="$2" ;; @@ -4264,6 +4268,18 @@ if test "$enable_ntdll_Pipe_SpecialCharacters" -eq 1; then ) >> "$patchlist" fi +# Patchset ntdll-ProcessQuotaLimits +# | +# | Modified files: +# | * dlls/ntdll/process.c +# | +if test "$enable_ntdll_ProcessQuotaLimits" -eq 1; then + patch_apply ntdll-ProcessQuotaLimits/0001-ntdll-Add-fake-data-implementation-for-ProcessQuotaL.patch + ( + echo '+ { "Qian Hong", "ntdll: Add fake data implementation for ProcessQuotaLimits class.", 1 },'; + ) >> "$patchlist" +fi + # Patchset ntdll-RtlIpStringToAddress # | # | Modified files: