Added patch to fix API signature of ntdll.NtAllocateUuids.

This commit is contained in:
Sebastian Lackner 2017-01-18 23:27:48 +01:00
parent e0e48313df
commit 96bce84236
3 changed files with 106 additions and 0 deletions

View File

@ -0,0 +1,86 @@
From e3f5a9e92c48948be5c6d8213b248fcc4b79e984 Mon Sep 17 00:00:00 2001
From: Louis Lenders <xerox.xerox2000x@gmail.com>
Date: Mon, 16 Jan 2017 12:12:39 +0100
Subject: ntdll: Improve stub for NtAllocateUuids
The function takes 4 arguments, not 3 (changed long time ago). See bug
https://bugs.winehq.org/show_bug.cgi?id=35910
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
---
dlls/ntdll/ntdll.spec | 4 ++--
dlls/ntdll/om.c | 7 ++++---
dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +-
include/winternl.h | 2 +-
4 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 28aa2df77e7..32ea2c8a12b 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -108,7 +108,7 @@
@ stdcall NtAlertThread(long)
@ stdcall NtAllocateLocallyUniqueId(ptr)
# @ stub NtAllocateUserPhysicalPages
-@ stdcall NtAllocateUuids(ptr ptr ptr)
+@ stdcall NtAllocateUuids(ptr ptr ptr ptr)
@ stdcall NtAllocateVirtualMemory(long ptr ptr ptr long long)
@ stdcall NtAreMappedFilesTheSame(ptr ptr)
@ stdcall NtAssignProcessToJobObject(long long)
@@ -1034,7 +1034,7 @@
@ stdcall -private ZwAlertThread(long) NtAlertThread
@ stdcall -private ZwAllocateLocallyUniqueId(ptr) NtAllocateLocallyUniqueId
# @ stub ZwAllocateUserPhysicalPages
-@ stdcall -private ZwAllocateUuids(ptr ptr ptr) NtAllocateUuids
+@ stdcall -private ZwAllocateUuids(ptr ptr ptr ptr) NtAllocateUuids
@ stdcall -private ZwAllocateVirtualMemory(long ptr ptr ptr long long) NtAllocateVirtualMemory
@ stdcall -private ZwAreMappedFilesTheSame(ptr ptr) NtAreMappedFilesTheSame
@ stdcall -private ZwAssignProcessToJobObject(long long) NtAssignProcessToJobObject
diff --git a/dlls/ntdll/om.c b/dlls/ntdll/om.c
index 1279f2bb4c6..c13934a89bd 100644
--- a/dlls/ntdll/om.c
+++ b/dlls/ntdll/om.c
@@ -691,10 +691,11 @@ NTSTATUS WINAPI NtQuerySymbolicLinkObject( HANDLE handle, PUNICODE_STRING target
NTSTATUS WINAPI NtAllocateUuids(
PULARGE_INTEGER Time,
PULONG Range,
- PULONG Sequence)
+ PULONG Sequence,
+ PUCHAR Seed)
{
- FIXME("(%p,%p,%p), stub.\n", Time, Range, Sequence);
- return 0;
+ FIXME("(%p,%p,%p,%p), stub.\n", Time, Range, Sequence, Seed);
+ return STATUS_SUCCESS;
}
/**************************************************************************
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index 50c442ad077..ec178c99a9e 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -736,7 +736,7 @@
@ stdcall NtAddAtom(ptr long ptr) ntdll.NtAddAtom
@ stdcall NtAdjustPrivilegesToken(long long long long long long) ntdll.NtAdjustPrivilegesToken
@ stdcall NtAllocateLocallyUniqueId(ptr) ntdll.NtAllocateLocallyUniqueId
-@ stdcall NtAllocateUuids(ptr ptr ptr) ntdll.NtAllocateUuids
+@ stdcall NtAllocateUuids(ptr ptr ptr ptr) ntdll.NtAllocateUuids
@ stdcall NtAllocateVirtualMemory(long ptr ptr ptr long long) ntdll.NtAllocateVirtualMemory
@ stub NtBuildNumber
@ stdcall NtClose(long) ntdll.NtClose
diff --git a/include/winternl.h b/include/winternl.h
index f35091cba1a..bf6e4f50410 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2159,7 +2159,7 @@ NTSYSAPI NTSTATUS WINAPI NtAdjustPrivilegesToken(HANDLE,BOOLEAN,PTOKEN_PRIVILEG
NTSYSAPI NTSTATUS WINAPI NtAlertResumeThread(HANDLE,PULONG);
NTSYSAPI NTSTATUS WINAPI NtAlertThread(HANDLE ThreadHandle);
NTSYSAPI NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID lpLuid);
-NTSYSAPI NTSTATUS WINAPI NtAllocateUuids(PULARGE_INTEGER,PULONG,PULONG);
+NTSYSAPI NTSTATUS WINAPI NtAllocateUuids(PULARGE_INTEGER,PULONG,PULONG,PUCHAR);
NTSYSAPI NTSTATUS WINAPI NtAllocateVirtualMemory(HANDLE,PVOID*,ULONG,SIZE_T*,ULONG,ULONG);
NTSYSAPI NTSTATUS WINAPI NtAreMappedFilesTheSame(PVOID,PVOID);
NTSYSAPI NTSTATUS WINAPI NtAssignProcessToJobObject(HANDLE,HANDLE);
--
2.11.0

View File

@ -0,0 +1 @@
Fixes: [35910] Fix API signature of ntdll.NtAllocateUuids

View File

@ -235,6 +235,7 @@ patch_enable_all ()
enable_ntdll_Junction_Points="$1"
enable_ntdll_Loader_Machine_Type="$1"
enable_ntdll_NtAccessCheck="$1"
enable_ntdll_NtAllocateUuids="$1"
enable_ntdll_NtQueryEaFile="$1"
enable_ntdll_NtQueryPerformanceCounter="$1"
enable_ntdll_NtQuerySection="$1"
@ -914,6 +915,9 @@ patch_enable ()
ntdll-NtAccessCheck)
enable_ntdll_NtAccessCheck="$2"
;;
ntdll-NtAllocateUuids)
enable_ntdll_NtAllocateUuids="$2"
;;
ntdll-NtQueryEaFile)
enable_ntdll_NtQueryEaFile="$2"
;;
@ -5538,6 +5542,21 @@ if test "$enable_ntdll_NtAccessCheck" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-NtAllocateUuids
# |
# | This patchset fixes the following Wine bugs:
# | * [#35910] Fix API signature of ntdll.NtAllocateUuids
# |
# | Modified files:
# | * dlls/ntdll/ntdll.spec, dlls/ntdll/om.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec, include/winternl.h
# |
if test "$enable_ntdll_NtAllocateUuids" -eq 1; then
patch_apply ntdll-NtAllocateUuids/0001-ntdll-Improve-stub-for-NtAllocateUuids.patch
(
echo '+ { "Louis Lenders", "ntdll: Improve stub for NtAllocateUuids.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-NtQueryPerformanceCounter
# |
# | Modified files: