ntdll-NtSetLdtEntries: Export the function also on other platforms (thanks Austin).

Whoops. Actually the function exists on x86_64, but similar to wow64, it just returns
STATUS_NOT_IMPLEMENTED.
This commit is contained in:
Sebastian Lackner 2016-04-30 02:29:10 +02:00
parent 424271828e
commit b7f0807cba
2 changed files with 0 additions and 69 deletions

View File

@ -1,67 +0,0 @@
From 9a0e823dfa31ea24a3e697bf3a3914011947c3e4 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 28 Apr 2016 17:07:35 +0200
Subject: ntdll: Export NtSetLdtEntries only on i386.
---
dlls/ntdll/nt.c | 9 ++++-----
dlls/ntdll/ntdll.spec | 4 ++--
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index fbea627..8238932 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -2784,6 +2784,8 @@ NTSTATUS WINAPI NtSystemDebugControl(SYSDBG_COMMAND command, PVOID inbuffer, ULO
return STATUS_NOT_IMPLEMENTED;
}
+#ifdef __i386__
+
/******************************************************************************
* NtSetLdtEntries (NTDLL.@)
* ZwSetLdtEntries (NTDLL.@)
@@ -2791,7 +2793,6 @@ NTSTATUS WINAPI NtSystemDebugControl(SYSDBG_COMMAND command, PVOID inbuffer, ULO
NTSTATUS WINAPI NtSetLdtEntries(ULONG selector1, ULONG entry1_low, ULONG entry1_high,
ULONG selector2, ULONG entry2_low, ULONG entry2_high)
{
-#ifdef __i386__
union
{
LDT_ENTRY entry;
@@ -2815,8 +2816,6 @@ NTSTATUS WINAPI NtSetLdtEntries(ULONG selector1, ULONG entry1_low, ULONG entry1_
return STATUS_ACCESS_DENIED;
}
return STATUS_SUCCESS;
-#else
- FIXME("(%x,%x,%x,%x,%x,%x): stub\n", selector1, entry1_low, entry1_high, selector2, entry2_low, entry2_high);
- return STATUS_NOT_IMPLEMENTED;
-#endif
}
+
+#endif /* __i386__ */
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 01c84c6..d4c4d52 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -340,7 +340,7 @@
@ stdcall NtSetInformationToken(long long ptr long)
@ stdcall NtSetIntervalProfile(long long)
@ stdcall NtSetIoCompletion(ptr long ptr long long)
-@ stdcall NtSetLdtEntries(long long long long long long)
+@ stdcall -i386 NtSetLdtEntries(long long long long long long)
@ stub NtSetLowEventPair
@ stub NtSetLowWaitHighEventPair
@ stub NtSetLowWaitHighThread
@@ -1261,7 +1261,7 @@
@ stdcall ZwSetInformationToken(long long ptr long) NtSetInformationToken
@ stdcall ZwSetIntervalProfile(long long) NtSetIntervalProfile
@ stdcall ZwSetIoCompletion(ptr long ptr long long) NtSetIoCompletion
-@ stdcall ZwSetLdtEntries(long long long long long long) NtSetLdtEntries
+@ stdcall -i386 ZwSetLdtEntries(long long long long long long) NtSetLdtEntries
@ stub ZwSetLowEventPair
@ stub ZwSetLowWaitHighEventPair
@ stub ZwSetLowWaitHighThread
--
2.8.0

View File

@ -4943,13 +4943,11 @@ if test "$enable_ntdll_NtSetLdtEntries" -eq 1; then
patch_apply ntdll-NtSetLdtEntries/0002-ntdll-Initialize-Reserved_0-bit-in-NtQueryInformatio.patch
patch_apply ntdll-NtSetLdtEntries/0003-ntdll-Implement-NtSetLdtEntries.patch
patch_apply ntdll-NtSetLdtEntries/0004-libs-wine-Allow-to-modify-reserved-LDT-entries.patch
patch_apply ntdll-NtSetLdtEntries/0005-ntdll-Export-NtSetLdtEntries-only-on-i386.patch
(
echo '+ { "Austin English", "ntdll: Add NtSetLdtEntries/ZwSetLdtEntries stub.", 2 },';
echo '+ { "Sebastian Lackner", "ntdll: Initialize Reserved_0 bit in NtQueryInformationThread.", 1 },';
echo '+ { "Dmitry Timoshkov", "ntdll: Implement NtSetLdtEntries.", 1 },';
echo '+ { "Dmitry Timoshkov", "libs/wine: Allow to modify reserved LDT entries.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: Export NtSetLdtEntries only on i386.", 1 },';
) >> "$patchlist"
fi