Added patch to improve IoGetDeviceObjectPointer stub to appease SecuROM 5.x.

This commit is contained in:
Sebastian Lackner 2015-06-15 03:27:14 +02:00
parent 7af67608ec
commit 5a89756c6a
5 changed files with 45 additions and 0 deletions

View File

@ -39,6 +39,11 @@ 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]:**
* SecuROM 5.x media validation fails ([Wine Bug #21448](https://bugs.winehq.org/show_bug.cgi?id=21448))
**Bug fixes and features in Wine Staging 1.7.45 [244]:**
*Note: The following list only contains features and bug fixes which are not

1
debian/changelog vendored
View File

@ -1,5 +1,6 @@
wine-staging (1.7.46) UNRELEASED; urgency=low
* Add reference to upstream bug report for various patchsets.
* Added patch to improve IoGetDeviceObjectPointer stub to appease SecuROM 5.x.
-- Sebastian Lackner <sebastian@fds-team.de> Sun, 14 Jun 2015 09:15:50 +0200
wine-staging (1.7.45) unstable; urgency=low

View File

@ -0,0 +1,35 @@
From 61970080c0dc917618c2884ceeeb1ef664705292 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Sun, 14 Jun 2015 18:58:20 -0600
Subject: ntoskrnl.exe: Improve IoGetDeviceObjectPointer stub to appease
SecuROM 5.x.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 2051939..57352e4 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -884,10 +884,16 @@ NTSTATUS WINAPI IoGetDeviceInterfaces( const GUID *InterfaceClassGuid,
*/
NTSTATUS WINAPI IoGetDeviceObjectPointer( UNICODE_STRING *name, ACCESS_MASK access, PFILE_OBJECT *file, PDEVICE_OBJECT *device )
{
+ static DEVICE_OBJECT stub_device;
+ static DRIVER_OBJECT stub_driver;
+
FIXME( "stub: %s %x %p %p\n", debugstr_us(name), access, file, device );
+ stub_device.StackSize = 0x80; /* minimum value to appease SecuROM 5.x */
+ stub_device.DriverObject = &stub_driver;
+
*file = NULL;
- *device = NULL;
+ *device = &stub_device;
return STATUS_SUCCESS;
}
--
2.4.3

View File

@ -11,3 +11,4 @@ Fixes: Add stub for ntoskrnl.Mm{Map,Unmap}LockedPages
Fixes: Implement ntoskrnl.KeInitializeMutex
Fixes: [38103] Process Hacker 2.x needs ntoskrnl.ProbeForRead
Fixes: Add stub for ntoskrnl.PsRemoveLoadImageNotifyRoutine
Fixes: [21448] SecuROM 5.x media validation fails

View File

@ -4005,6 +4005,7 @@ fi
# |
# | This patchset fixes the following Wine bugs:
# | * [#38103] Process Hacker 2.x needs ntoskrnl.ProbeForRead
# | * [#21448] SecuROM 5.x media validation fails
# |
# | Modified files:
# | * dlls/ntoskrnl.exe/ntoskrnl.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec, include/ddk/wdm.h
@ -4027,6 +4028,7 @@ if test "$enable_ntoskrnl_Stubs" -eq 1; then
patch_apply ntoskrnl-Stubs/0015-ntoskrnl.exe-Add-stub-for-ProbeForRead.patch
patch_apply ntoskrnl-Stubs/0016-ntoskrnl.exe-Add-stub-for-ProbeForWrite.patch
patch_apply ntoskrnl-Stubs/0017-ntoskrnl.exe-Add-stub-for-PsRemoveLoadImageNotifyRou.patch
patch_apply ntoskrnl-Stubs/0018-ntoskrnl.exe-Improve-IoGetDeviceObjectPointer-stub-t.patch
(
echo '+ { "Austin English", "ntoskrnl.exe: add KeWaitForMultipleObjects stub.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Add stub for IoGetAttachedDeviceReference.", 1 },';
@ -4045,6 +4047,7 @@ if test "$enable_ntoskrnl_Stubs" -eq 1; then
echo '+ { "Austin English", "ntoskrnl.exe: Add stub for ProbeForRead.", 1 },';
echo '+ { "Sebastian Lackner", "ntoskrnl.exe: Add stub for ProbeForWrite.", 1 },';
echo '+ { "Michael Müller", "ntoskrnl.exe: Add stub for PsRemoveLoadImageNotifyRoutine.", 1 },';
echo '+ { "Erich E. Hoover", "ntoskrnl.exe: Improve IoGetDeviceObjectPointer stub to appease SecuROM 5.x.", 1 },';
) >> "$patchlist"
fi