Compare commits

..

5 Commits

Author SHA1 Message Date
Sebastian Lackner
126524d9ce Release 1.8.4. 2016-09-03 22:43:51 +02:00
Sebastian Lackner
441bcce3db patchinstall.sh: Add support for eapply backend and mark epatch as deprecated (thanks NP-Hardass).
(cherry picked from commit e875860886)
2016-08-25 22:17:58 +02:00
Sebastian Lackner
1bf2e6fe90 Rebase against c03303838dc648b4dc9fc8d0c78b4ec51a455253.
[api-ms-win-crt-Stub_DLLs]
Removed patch to forward urcrtbase *_base functions to msvcrt (fixed upstream).

[kernel32-FreeUserPhysicalPages]
Removed patch to add stub for kernel32.FreeUserPhysicalPages (accepted
upstream).

[ntdll-NtSetLdtEntries]
Removed patch to add stub for NtSetLdtEntries/ZwSetLdtEntries (accepted
upstream).

[secur32-ANSI_NTLM_Credentials]
Removed patch to fix handling of ANSI NTLM credentials (accepted upstream).

[winsta-WinStationEnumerateW]
Removed patch to add stub for winsta.WinStationEnumerateW (accepted upstream).

[ws2_32-Sort_default_route]
Removed patch to ensure default route IP addresses are returned in correct
order (accepted upstream).
2016-08-25 21:59:49 +02:00
Sebastian Lackner
9d13bfd569 Release 1.8.3. 2016-07-10 07:01:18 +02:00
Sebastian Lackner
739a308958 Rebase against 205228eb80089c38b25e7249073021e7806d2bfa.
[dinput-DIPROP_USERNAME]
Removed patch to implement dinput device property DIPROP_USERNAME (accepted
upstream).

[kernel32-GetFinalPathNameByHandle]
Removed patch to add support for GetFinalPathNameByHandle (accepted upstream).

[ntoskrnl-Stubs]
Removed patches for KeDelayExecutionThread and PsRemoveLoadImageNotifyRoutine
stubs (accepted upstream).

[server-Parent_Process]
Removed patch to avoid holding reference on parent process in wineserver
(accepted upstream).

[wined3d-Geforce_425M]
Removed patch to add wined3d detection for GeForce GT 425M (accepted upstream).

[winscard-SCardListReaders]
Removed patch to add stub for winscard.SCardListReadersA/W (accepted upstream).
2016-06-25 19:50:04 +02:00
42 changed files with 300 additions and 1986 deletions

View File

@@ -66,7 +66,8 @@ Configuration:
Backends:
--backend=patch Use regular 'patch' utility to apply patches (default)
--backend=epatch Use 'epatch' to apply patches (Gentoo only)
--backend=eapply Use 'eapply' to apply patches (Gentoo only)
--backend=epatch Use 'epatch' to apply patches (Gentoo only, deprecated)
--backend=git-am Use 'git am' to apply patches
--backend=git-apply Use 'git apply' to apply patches
--backend=stg Import the patches using stacked git

View File

@@ -1,14 +1,14 @@
From 4d0e6bbc00bd49b8dcfce494bd7380c49f58f92b Mon Sep 17 00:00:00 2001
From 4bec6ad3640799a4b8bdb1d1987d8e65e15c0355 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 28 Jul 2015 18:21:20 +0200
Subject: amstream: Implement IAMMediaStream::GetMultiMediaStream.
---
dlls/amstream/mediastream.c | 40 ++++++++++++++++++++++++++++++++--------
1 file changed, 32 insertions(+), 8 deletions(-)
dlls/amstream/mediastream.c | 30 ++++++++++++++++++++++++------
1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/dlls/amstream/mediastream.c b/dlls/amstream/mediastream.c
index 947be1e..e4e15d7 100644
index 51349ab..98fca62 100644
--- a/dlls/amstream/mediastream.c
+++ b/dlls/amstream/mediastream.c
@@ -110,9 +110,15 @@ static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_GetMultiMediaStre
@@ -29,25 +29,7 @@ index 947be1e..e4e15d7 100644
}
static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_GetInformation(IAMMediaStream *iface,
@@ -271,9 +277,15 @@ static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetMultiM
{
DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface);
- FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppMultiMediaStream);
+ TRACE("(%p/%p)->(%p) stub!\n", This, iface, ppMultiMediaStream);
- return S_FALSE;
+ if (!ppMultiMediaStream)
+ return E_POINTER;
+
+ IMultiMediaStream_AddRef(This->parent);
+ *ppMultiMediaStream = This->parent;
+
+ return S_OK;
}
static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetInformation(IDirectDrawMediaStream *iface,
@@ -511,9 +523,15 @@ static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_GetMultiMediaStream(IA
@@ -517,9 +523,15 @@ static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_GetMultiMediaStream(IA
{
AudioMediaStreamImpl *This = impl_from_AudioMediaStream_IAMMediaStream(iface);
@@ -65,7 +47,7 @@ index 947be1e..e4e15d7 100644
}
static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_GetInformation(IAMMediaStream *iface,
@@ -672,9 +690,15 @@ static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_GetMultiMediaStream
@@ -678,9 +690,15 @@ static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_GetMultiMediaStream
{
AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface);
@@ -84,5 +66,5 @@ index 947be1e..e4e15d7 100644
static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_GetInformation(IAudioMediaStream *iface,
--
2.4.5
2.9.0

View File

@@ -1,46 +0,0 @@
From fe4c1e1f10f8edc76c5dad994ed2e5202f9c2821 Mon Sep 17 00:00:00 2001
From: Martin Storsjo <martin@martin.st>
Date: Mon, 3 Aug 2015 22:26:01 +0300
Subject: ucrtbase: Hook up some functions with new names to existing
implementations
These are some functions that on a first glance seem to have a
matching signature even though the name has changed.
---
dlls/ucrtbase/ucrtbase.spec | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index bb56408..cee094d 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -211,7 +211,7 @@
@ cdecl _c_exit() MSVCRT__c_exit
@ cdecl _cabs(long) MSVCRT__cabs
@ cdecl _callnewh(long)
-@ stub _calloc_base
+@ cdecl _calloc_base(long long) MSVCRT_calloc
@ cdecl _cexit() MSVCRT__cexit
@ cdecl _cgets(ptr)
@ stub _cgets_s
@@ -333,7 +333,7 @@
@ cdecl _fputwchar(long) MSVCRT__fputwchar
@ cdecl _fread_nolock(ptr long long ptr) MSVCRT__fread_nolock
@ cdecl _fread_nolock_s(ptr long long long ptr) MSVCRT__fread_nolock_s
-@ stub _free_base
+@ cdecl _free_base(ptr) MSVCRT_free
@ cdecl _free_locale(ptr) MSVCRT__free_locale
@ cdecl _fseek_nolock(ptr long long) MSVCRT__fseek_nolock
@ cdecl _fseeki64(ptr int64 long) MSVCRT__fseeki64
@@ -580,7 +580,7 @@
@ cdecl _ltow_s(long ptr long long) MSVCRT__ltow_s
@ cdecl _makepath(ptr str str str str) MSVCRT__makepath
@ cdecl _makepath_s(ptr long str str str str) MSVCRT__makepath_s
-@ stub _malloc_base
+@ cdecl _malloc_base(long) MSVCRT_malloc
@ cdecl _mbbtombc(long)
@ stub _mbbtombc_l
@ cdecl _mbbtype(long long)
--
2.5.0

View File

@@ -1 +0,0 @@
Fixes: Add stub dlls required for MSVC 2015 runtime library (Windows 10)

View File

@@ -1,177 +0,0 @@
From 4eb926239cec9c6dfa489056bb30d698039926a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bernhard=20=C3=9Cbelacker?= <bernhardu@vr-web.de>
Date: Tue, 24 Nov 2015 21:13:50 +0100
Subject: dinput: Implement device property DIPROP_USERNAME.
https://bugs.winehq.org/show_bug.cgi?id=39667
Probably same issue as in https://bugs.winehq.org/show_bug.cgi?id=12432 .
(Attached backtrace seems equal.)
Steps to reproduce:
- start launcher
- "Configure Controller"
- leave dialog with "Cancel"
- crash
MotoGP 3 demo launcher uses ConfigureDevices for the key mapping.
This seems because the result of a GetProperty(DIPROP_USERNAME) is used
without checking.
---
dlls/dinput/device.c | 39 +++++++++++++++++++++++++++++++++++++++
dlls/dinput/device_private.h | 1 +
dlls/dinput8/tests/device.c | 29 +++++++++++++++++++++++++++--
3 files changed, 67 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index e525f01..41fb2c4 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -778,11 +778,13 @@ HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf,
HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags, LPCDIDATAFORMAT df)
{
+ static const WCHAR emptyW[] = { 0 };
IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8W(iface);
DIDATAFORMAT data_format;
DIOBJECTDATAFORMAT *obj_df = NULL;
DIPROPDWORD dp;
DIPROPRANGE dpr;
+ DIPROPSTRING dps;
WCHAR username[MAX_PATH];
DWORD username_size = MAX_PATH;
int i, action = 0, num_actions = 0;
@@ -863,6 +865,13 @@ HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, L
else
lstrcpynW(username, lpszUserName, MAX_PATH);
+ dps.diph.dwSize = sizeof(dps);
+ dps.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+ dps.diph.dwObj = 0;
+ dps.diph.dwHow = DIPH_DEVICE;
+ lstrcpynW(dps.wsz, (dwFlags & DIDSAM_NOUSER) ? emptyW : username, sizeof(dps.wsz)/sizeof(WCHAR));
+ IDirectInputDevice8_SetProperty(iface, DIPROP_USERNAME, &dps.diph);
+
/* Save the settings to disk */
save_mapping_settings(iface, lpdiaf, username);
@@ -1100,6 +1109,9 @@ ULONG WINAPI IDirectInputDevice2WImpl_Release(LPDIRECTINPUTDEVICE8W iface)
/* Free action mapping */
HeapFree(GetProcessHeap(), 0, This->action_map);
+ /* Free username */
+ HeapFree(GetProcessHeap(), 0, This->username);
+
EnterCriticalSection( &This->dinput->crit );
list_remove( &This->entry );
LeaveCriticalSection( &This->dinput->crit );
@@ -1251,6 +1263,17 @@ HRESULT WINAPI IDirectInputDevice2WImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface,
TRACE("buffersize = %d\n", pd->dwData);
break;
}
+ case (DWORD_PTR) DIPROP_USERNAME:
+ {
+ LPDIPROPSTRING ps = (LPDIPROPSTRING)pdiph;
+
+ if (pdiph->dwSize != sizeof(DIPROPSTRING)) return DIERR_INVALIDPARAM;
+
+ ps->wsz[0] = 0;
+ if (This->username)
+ lstrcpynW(ps->wsz, This->username, sizeof(ps->wsz)/sizeof(WCHAR));
+ break;
+ }
case (DWORD_PTR) DIPROP_VIDPID:
FIXME("DIPROP_VIDPID not implemented\n");
return DIERR_UNSUPPORTED;
@@ -1324,6 +1347,22 @@ HRESULT WINAPI IDirectInputDevice2WImpl_SetProperty(
LeaveCriticalSection(&This->crit);
break;
}
+ case (DWORD_PTR) DIPROP_USERNAME:
+ {
+ LPCDIPROPSTRING ps = (LPCDIPROPSTRING)pdiph;
+
+ if (pdiph->dwSize != sizeof(DIPROPSTRING)) return DIERR_INVALIDPARAM;
+
+ if (!This->username)
+ This->username = HeapAlloc(GetProcessHeap(), 0, sizeof(ps->wsz));
+ if (!This->username)
+ return DIERR_OUTOFMEMORY;
+
+ This->username[0] = 0;
+ if (ps->wsz)
+ lstrcpynW(This->username, ps->wsz, sizeof(ps->wsz)/sizeof(WCHAR));
+ break;
+ }
default:
WARN("Unknown property %s\n", debugstr_guid(rguid));
return DIERR_UNSUPPORTED;
diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h
index 52bbec4..44fa46a 100644
--- a/dlls/dinput/device_private.h
+++ b/dlls/dinput/device_private.h
@@ -81,6 +81,7 @@ struct IDirectInputDeviceImpl
/* Action mapping */
int num_actions; /* number of actions mapped */
ActionMap *action_map; /* array of mappings */
+ WCHAR *username; /* set by 'SetActionMap' */
};
extern BOOL get_app_key(HKEY*, HKEY*) DECLSPEC_HIDDEN;
diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c
index 6495559..b5e27ad 100644
--- a/dlls/dinput8/tests/device.c
+++ b/dlls/dinput8/tests/device.c
@@ -223,8 +223,8 @@ static BOOL CALLBACK enumeration_callback(const DIDEVICEINSTANCEA *lpddi, IDirec
dps.wsz[0] = '\0';
hr = IDirectInputDevice_GetProperty(lpdid, DIPROP_USERNAME, &dps.diph);
- todo_wine ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
- todo_wine ok (!lstrcmpW(usernameW, dps.wsz), "Username not set correctly expected=%s, got=%s\n", wine_dbgstr_wn(usernameW, -1), wine_dbgstr_wn(dps.wsz, -1));
+ ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
+ ok (!lstrcmpW(usernameW, dps.wsz), "Username not set correctly expected=%s, got=%s\n", wine_dbgstr_wn(usernameW, -1), wine_dbgstr_wn(dps.wsz, -1));
/* Test buffer size */
memset(&dp, 0, sizeof(dp));
@@ -275,6 +275,7 @@ static void test_action_mapping(void)
HINSTANCE hinst = GetModuleHandleA(NULL);
IDirectInput8A *pDI = NULL;
DIACTIONFORMATA af;
+ DIPROPSTRING dps;
struct enum_data data = {pDI, &af, NULL, NULL, NULL, 0};
HWND hwnd;
@@ -342,6 +343,30 @@ static void test_action_mapping(void)
af.dwDataSize = 4 * sizeof(actionMapping) / sizeof(actionMapping[0]);
af.dwNumActions = sizeof(actionMapping) / sizeof(actionMapping[0]);
+
+ /* test DIDSAM_NOUSER */
+ dps.diph.dwSize = sizeof(dps);
+ dps.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+ dps.diph.dwObj = 0;
+ dps.diph.dwHow = DIPH_DEVICE;
+ dps.wsz[0] = '\0';
+
+ hr = IDirectInputDevice_GetProperty(data.keyboard, DIPROP_USERNAME, &dps.diph);
+ ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
+ ok (dps.wsz[0] != 0, "Expected any username, got=%s\n", wine_dbgstr_wn(dps.wsz, -1));
+
+ hr = IDirectInputDevice8_SetActionMap(data.keyboard, data.lpdiaf, NULL, DIDSAM_NOUSER);
+ ok (SUCCEEDED(hr), "SetActionMap failed hr=%08x\n", hr);
+
+ dps.diph.dwSize = sizeof(dps);
+ dps.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+ dps.diph.dwObj = 0;
+ dps.diph.dwHow = DIPH_DEVICE;
+ dps.wsz[0] = '\0';
+
+ hr = IDirectInputDevice_GetProperty(data.keyboard, DIPROP_USERNAME, &dps.diph);
+ ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);
+ ok (dps.wsz[0] == 0, "Expected empty username, got=%s\n", wine_dbgstr_wn(dps.wsz, -1));
}
if (data.mouse != NULL)
--
2.6.2

View File

@@ -1 +0,0 @@
Fixes: [39667] Implement dinput device property DIPROP_USERNAME

View File

@@ -1,4 +1,4 @@
From 6ae55e62a81e4f4ded0ea14926f014b6d6a4b633 Mon Sep 17 00:00:00 2001
From 3c0f4068c5e5319560525b157e704dccf0e6353e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 28 Oct 2015 22:36:01 +0100
Subject: hal: Implement KeQueryPerformanceCounter.
@@ -9,12 +9,12 @@ Subject: hal: Implement KeQueryPerformanceCounter.
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/hal/hal.c b/dlls/hal/hal.c
index 96bc895..145869d 100644
index 0b2e422..be3a48b 100644
--- a/dlls/hal/hal.c
+++ b/dlls/hal/hal.c
@@ -155,3 +155,13 @@ KIRQL WINAPI KeGetCurrentIrql(VOID)
FIXME( " stub!\n");
return 0;
@@ -172,3 +172,13 @@ void WINAPI WRITE_PORT_ULONG(ULONG *port, ULONG value)
{
FIXME("(%p %d) stub!\n", port, value);
}
+
+ULONGLONG WINAPI KeQueryPerformanceCounter(LARGE_INTEGER *frequency)
@@ -27,7 +27,7 @@ index 96bc895..145869d 100644
+ return counter.QuadPart;
+}
diff --git a/dlls/hal/hal.spec b/dlls/hal/hal.spec
index 3046c65..dc908dd 100644
index c21806c..243c67b 100644
--- a/dlls/hal/hal.spec
+++ b/dlls/hal/hal.spec
@@ -72,7 +72,7 @@
@@ -40,5 +40,5 @@ index 3046c65..dc908dd 100644
@ stub KeRaiseIrqlToDpcLevel
@ stub KeRaiseIrqlToSynchLevel
--
2.6.2
2.9.0

View File

@@ -1,53 +0,0 @@
From 0aab8389ccbaf7c89a37112faef790ef45b0b15f Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 3 Nov 2015 11:03:54 -0600
Subject: kernel32: add FreeUserPhysicalPages stub (try 2)
For https://bugs.winehq.org/show_bug.cgi?id=39543
Signed-off-by: Austin English <austinenglish@gmail.com>
---
dlls/kernel32/heap.c | 7 +++++++
dlls/kernel32/kernel32.spec | 4 ++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c
index 0c05de6..e86b292 100644
--- a/dlls/kernel32/heap.c
+++ b/dlls/kernel32/heap.c
@@ -1490,3 +1490,10 @@ BOOL WINAPI AllocateUserPhysicalPages(HANDLE process, ULONG_PTR *pages, ULONG_PT
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
+
+BOOL WINAPI FreeUserPhysicalPages(HANDLE process, ULONG_PTR *pages, ULONG_PTR *userarray)
+{
+ FIXME("stub: %p %p %p\n", process, pages, userarray);
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
+}
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index ff67e54..d4e1d01 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -154,7 +154,7 @@
@ stdcall AllocConsole()
@ stub -i386 AllocLSCallback
@ stdcall -i386 -private AllocSLCallback(ptr ptr) krnl386.exe16.AllocSLCallback
-@ stdcall AllocateUserPhysicalPages(ptr ptr ptr)
+@ stdcall AllocateUserPhysicalPages(long ptr ptr)
@ stdcall ApplicationRecoveryFinished(long)
@ stdcall ApplicationRecoveryInProgress(ptr)
@ stdcall AreFileApisANSI()
@@ -535,7 +535,7 @@
@ stdcall FreeLibraryWhenCallbackReturns(ptr ptr) ntdll.TpCallbackUnloadDllOnCompletion
@ stdcall FreeResource(long)
@ stdcall -i386 -private FreeSLCallback(long) krnl386.exe16.FreeSLCallback
-@ stub FreeUserPhysicalPages
+@ stdcall FreeUserPhysicalPages(long ptr ptr)
@ stub FreeVirtualBuffer
@ stdcall GenerateConsoleCtrlEvent(long long)
@ stdcall -i386 -private Get16DLLAddress(long str) krnl386.exe16.Get16DLLAddress
--
2.6.2

View File

@@ -1 +0,0 @@
Fixes: [39543] Add stub kernel32.FreeUserPhysicalPages

View File

@@ -1,251 +0,0 @@
From afd33fadd45f1073ac0b8734d7003ba46b5d1269 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 12 Aug 2014 20:24:14 +0200
Subject: kernel32: Implement GetFinalPathNameByHandle.
---
.../api-ms-win-core-file-l1-1-0.spec | 4 +-
.../api-ms-win-core-file-l1-2-0.spec | 4 +-
dlls/kernel32/file.c | 182 +++++++++++++++++++++
dlls/kernel32/kernel32.spec | 4 +-
4 files changed, 188 insertions(+), 6 deletions(-)
diff --git a/dlls/api-ms-win-core-file-l1-1-0/api-ms-win-core-file-l1-1-0.spec b/dlls/api-ms-win-core-file-l1-1-0/api-ms-win-core-file-l1-1-0.spec
index 9e5b809..61e8038 100644
--- a/dlls/api-ms-win-core-file-l1-1-0/api-ms-win-core-file-l1-1-0.spec
+++ b/dlls/api-ms-win-core-file-l1-1-0/api-ms-win-core-file-l1-1-0.spec
@@ -39,8 +39,8 @@
@ stdcall GetFileSizeEx(long ptr) kernel32.GetFileSizeEx
@ stdcall GetFileTime(long ptr ptr ptr) kernel32.GetFileTime
@ stdcall GetFileType(long) kernel32.GetFileType
-@ stub GetFinalPathNameByHandleA
-@ stub GetFinalPathNameByHandleW
+@ stdcall GetFinalPathNameByHandleA(long ptr long long) kernel32.GetFinalPathNameByHandleA
+@ stdcall GetFinalPathNameByHandleW(long ptr long long) kernel32.GetFinalPathNameByHandleW
@ stdcall GetFullPathNameA(str long ptr ptr) kernel32.GetFullPathNameA
@ stdcall GetFullPathNameW(wstr long ptr ptr) kernel32.GetFullPathNameW
@ stdcall GetLogicalDriveStringsW(long ptr) kernel32.GetLogicalDriveStringsW
diff --git a/dlls/api-ms-win-core-file-l1-2-0/api-ms-win-core-file-l1-2-0.spec b/dlls/api-ms-win-core-file-l1-2-0/api-ms-win-core-file-l1-2-0.spec
index ebfd52e..cddf112 100644
--- a/dlls/api-ms-win-core-file-l1-2-0/api-ms-win-core-file-l1-2-0.spec
+++ b/dlls/api-ms-win-core-file-l1-2-0/api-ms-win-core-file-l1-2-0.spec
@@ -39,8 +39,8 @@
@ stdcall GetFileSizeEx(long ptr) kernel32.GetFileSizeEx
@ stdcall GetFileTime(long ptr ptr ptr) kernel32.GetFileTime
@ stdcall GetFileType(long) kernel32.GetFileType
-@ stub GetFinalPathNameByHandleA
-@ stub GetFinalPathNameByHandleW
+@ stdcall GetFinalPathNameByHandleA(long ptr long long) kernel32.GetFinalPathNameByHandleA
+@ stdcall GetFinalPathNameByHandleW(long ptr long long) kernel32.GetFinalPathNameByHandleW
@ stdcall GetFullPathNameA(str long ptr ptr) kernel32.GetFullPathNameA
@ stdcall GetFullPathNameW(wstr long ptr ptr) kernel32.GetFullPathNameW
@ stdcall GetLogicalDriveStringsW(long ptr) kernel32.GetLogicalDriveStringsW
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c
index 006db1c..b3cc8c3 100644
--- a/dlls/kernel32/file.c
+++ b/dlls/kernel32/file.c
@@ -2829,3 +2829,185 @@ DWORD WINAPI K32GetDeviceDriverFileNameW(void *image_base, LPWSTR file_name, DWO
return 0;
}
+
+/***********************************************************************
+ * GetFinalPathNameByHandleW (KERNEL32.@)
+ */
+DWORD WINAPI GetFinalPathNameByHandleW(HANDLE file, LPWSTR path, DWORD charcount, DWORD flags)
+{
+ WCHAR buffer[sizeof(OBJECT_NAME_INFORMATION) + MAX_PATH + 1];
+ OBJECT_NAME_INFORMATION *info = (OBJECT_NAME_INFORMATION*)&buffer;
+ WCHAR drive_part[MAX_PATH];
+ DWORD drive_part_len;
+ NTSTATUS status;
+ DWORD result = 0;
+ ULONG dummy;
+ WCHAR *ptr;
+
+ TRACE( "(%p,%p,%d,%x)\n", file, path, charcount, flags );
+
+ /* check for invalid arguments */
+ if (!path)
+ {
+ SetLastError( ERROR_INVALID_PARAMETER );
+ return 0;
+ }
+ else if (file == INVALID_HANDLE_VALUE)
+ {
+ SetLastError( ERROR_INVALID_HANDLE );
+ return 0;
+ }
+ else if (flags & ~(FILE_NAME_OPENED | VOLUME_NAME_GUID | VOLUME_NAME_NONE | VOLUME_NAME_NT))
+ {
+ WARN("Invalid or unsupported flags: %x\n", flags);
+ SetLastError( ERROR_INVALID_PARAMETER );
+ return 0;
+ }
+
+ /* get object name */
+ status = NtQueryObject( file, ObjectNameInformation, &buffer, sizeof(buffer) - sizeof(WCHAR), &dummy );
+ if (status != STATUS_SUCCESS)
+ {
+ SetLastError( RtlNtStatusToDosError( status ) );
+ return 0;
+ }
+ else if (info->Name.Length < 4 * sizeof(WCHAR) || info->Name.Buffer[0] != '\\' ||
+ info->Name.Buffer[1] != '?' || info->Name.Buffer[2] != '?' || info->Name.Buffer[3] != '\\' )
+ {
+ FIXME("Unexpected object name: %s\n", debugstr_wn(info->Name.Buffer, info->Name.Length / sizeof(WCHAR)));
+ SetLastError( ERROR_GEN_FAILURE );
+ return 0;
+ }
+
+ /* add terminating null character, remove "\\??\\" */
+ info->Name.Buffer[info->Name.Length / sizeof(WCHAR)] = 0;
+ info->Name.Length -= 4 * sizeof(WCHAR);
+ info->Name.Buffer += 4;
+
+ /* FILE_NAME_OPENED is not supported yet, and would require Wineserver changes */
+ if (flags & FILE_NAME_OPENED)
+ {
+ FIXME("FILE_NAME_OPENED not supported\n");
+ flags &= ~FILE_NAME_OPENED;
+ }
+
+ /* Get information required for VOLUME_NAME_NONE, VOLUME_NAME_GUID and VOLUME_NAME_NT */
+ if (flags == VOLUME_NAME_NONE || flags == VOLUME_NAME_GUID || flags == VOLUME_NAME_NT)
+ {
+ if (!GetVolumePathNameW( info->Name.Buffer, drive_part, MAX_PATH ))
+ return 0;
+
+ drive_part_len = strlenW(drive_part);
+ if (!drive_part_len || drive_part_len > strlenW(info->Name.Buffer) ||
+ drive_part[drive_part_len-1] != '\\' ||
+ strncmpiW( info->Name.Buffer, drive_part, drive_part_len ))
+ {
+ FIXME("Path %s returned by GetVolumePathNameW does not match file path %s\n",
+ debugstr_w(drive_part), debugstr_w(info->Name.Buffer));
+ SetLastError( ERROR_GEN_FAILURE );
+ return 0;
+ }
+ }
+
+ if (flags == VOLUME_NAME_NONE)
+ {
+ ptr = info->Name.Buffer + drive_part_len - 1;
+ result = strlenW(ptr);
+ if (result < charcount)
+ memcpy(path, ptr, (result + 1) * sizeof(WCHAR));
+ else result++;
+ }
+ else if (flags == VOLUME_NAME_GUID)
+ {
+ WCHAR volume_prefix[51];
+
+ /* GetVolumeNameForVolumeMountPointW sets error code on failure */
+ if (!GetVolumeNameForVolumeMountPointW( drive_part, volume_prefix, 50 ))
+ return 0;
+
+ ptr = info->Name.Buffer + drive_part_len;
+ result = strlenW(volume_prefix) + strlenW(ptr);
+ if (result < charcount)
+ {
+ path[0] = 0;
+ strcatW(path, volume_prefix);
+ strcatW(path, ptr);
+ }
+ else result++;
+ }
+ else if (flags == VOLUME_NAME_NT)
+ {
+ WCHAR nt_prefix[MAX_PATH];
+
+ /* QueryDosDeviceW sets error code on failure */
+ drive_part[drive_part_len - 1] = 0;
+ if (!QueryDosDeviceW( drive_part, nt_prefix, MAX_PATH ))
+ return 0;
+
+ ptr = info->Name.Buffer + drive_part_len - 1;
+ result = strlenW(nt_prefix) + strlenW(ptr);
+ if (result < charcount)
+ {
+ path[0] = 0;
+ strcatW(path, nt_prefix);
+ strcatW(path, ptr);
+ }
+ else result++;
+ }
+ else if (flags == VOLUME_NAME_DOS)
+ {
+ static const WCHAR dos_prefix[] = {'\\','\\','?','\\', '\0'};
+
+ result = strlenW(dos_prefix) + strlenW(info->Name.Buffer);
+ if (result < charcount)
+ {
+ path[0] = 0;
+ strcatW(path, dos_prefix);
+ strcatW(path, info->Name.Buffer);
+ }
+ else result++;
+ }
+ else
+ {
+ /* Windows crashes here, but we prefer returning ERROR_INVALID_PARAMETER */
+ WARN("Invalid combination of flags: %x\n", flags);
+ SetLastError( ERROR_INVALID_PARAMETER );
+ }
+
+ return result;
+}
+
+/***********************************************************************
+ * GetFinalPathNameByHandleA (KERNEL32.@)
+ */
+DWORD WINAPI GetFinalPathNameByHandleA(HANDLE file, LPSTR path, DWORD charcount, DWORD flags)
+{
+ WCHAR *str;
+ DWORD result;
+
+ TRACE( "(%p,%p,%d,%x)\n", file, path, charcount, flags );
+
+ if (!path || !charcount)
+ return GetFinalPathNameByHandleW(file, (LPWSTR)path, charcount, flags);
+
+ str = HeapAlloc( GetProcessHeap(), 0, charcount * sizeof(WCHAR) );
+ if (!str)
+ {
+ SetLastError( ERROR_NOT_ENOUGH_MEMORY );
+ return 0;
+ }
+
+ result = GetFinalPathNameByHandleW(file, (LPWSTR)str, charcount, flags);
+ if (result)
+ {
+ if (result < charcount)
+ {
+ result = FILE_name_WtoA( str, result, path, charcount - 1 );
+ path[result] = 0;
+ }
+ else result--; /* Why does Windows do this? */
+ }
+
+ HeapFree( GetProcessHeap(), 0, str );
+ return result;
+}
\ No newline at end of file
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index bb72041..b7bead0 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -682,8 +682,8 @@
@ stdcall GetFileSizeEx(long ptr)
@ stdcall GetFileTime(long ptr ptr ptr)
@ stdcall GetFileType(long)
-# @ stub GetFinalPathNameByHandleA
-# @ stub GetFinalPathNameByHandleW
+@ stdcall GetFinalPathNameByHandleA(long ptr long long)
+@ stdcall GetFinalPathNameByHandleW(long ptr long long)
@ stdcall GetFirmwareEnvironmentVariableA(str str ptr long)
@ stdcall GetFirmwareEnvironmentVariableW(wstr wstr ptr long)
@ stdcall GetFullPathNameA(str long ptr ptr)
--
2.4.0

View File

@@ -1 +0,0 @@
Fixes: [34851] Support for GetFinalPathNameByHandle

View File

@@ -1,4 +1,4 @@
From 9a4f8fae5a735a8ceeec6136b548420abb69f336 Mon Sep 17 00:00:00 2001
From f97150c35f617561b99e71f3b7568170f72890a6 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dtimoshkov@codeweavers.com>
Date: Mon, 28 Jul 2003 07:39:25 -0500
Subject: libs: Fix most problems with CompareString.
@@ -9,10 +9,10 @@ Subject: libs: Fix most problems with CompareString.
2 files changed, 34 insertions(+), 35 deletions(-)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index 7b0212e..cba3ebc 100644
index 3054c50..d12378d 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -1759,13 +1759,13 @@ static void test_CompareStringA(void)
@@ -1763,13 +1763,13 @@ static void test_CompareStringA(void)
todo_wine ok(ret != CSTR_EQUAL, "\\2 vs \\1 expected unequal\n");
ret = CompareStringA(lcid, NORM_IGNORECASE | LOCALE_USE_CP_ACP, "#", -1, ".", -1);
@@ -29,10 +29,10 @@ index 7b0212e..cba3ebc 100644
lcid = MAKELCID(MAKELANGID(LANG_POLISH, SUBLANG_DEFAULT), SORT_DEFAULT);
@@ -4600,6 +4600,5 @@ START_TEST(locale)
test_GetGeoInfo();
test_EnumSystemGeoID();
@@ -4851,6 +4851,5 @@ START_TEST(locale)
test_invariant();
test_GetSystemPreferredUILanguages();
test_GetThreadPreferredUILanguages();
- /* this requires collation table patch to make it MS compatible */
- if (0) test_sorting();
+ test_sorting();
@@ -168,5 +168,5 @@ index 465d740..f354a75 100644
0x0a130121, 0x0a140121, 0x02370121, 0x02350121, 0x03a30121, 0x03a40121, 0x03a50121, 0x024e0121,
0x02a10121, 0x0a150161, 0x0a290151, 0x0a3d0161, 0x0a490161, 0x0a650161, 0x0a910161, 0x0a990161,
--
2.6.2
2.9.0

View File

@@ -1,82 +0,0 @@
From 15201062dd669c30343f7d1a1157c254943267ea Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Wed, 19 Feb 2014 12:54:00 -0800
Subject: ntdll: add NtSetLdtEntries/ZwSetLdtEntries stub (try 2)
---
dlls/ntdll/nt.c | 12 ++++++++++++
dlls/ntdll/ntdll.spec | 4 ++--
include/ddk/wdm.h | 1 +
include/winternl.h | 2 +-
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 73d9383..0d11037 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -2446,3 +2446,15 @@ NTSTATUS WINAPI NtSystemDebugControl(SYSDBG_COMMAND command, PVOID inbuffer, ULO
return STATUS_NOT_IMPLEMENTED;
}
+
+/******************************************************************************
+ * NtSetLdtEntries (NTDLL.@)
+ * ZwSetLdtEntries (NTDLL.@)
+ */
+NTSTATUS WINAPI NtSetLdtEntries(ULONG selector1, ULONG entry1_low, ULONG entry1_high,
+ ULONG selector2, ULONG entry2_low, ULONG entry2_high)
+{
+ FIXME("(%u, %u, %u, %u, %u, %u): stub\n", selector1, entry1_low, entry1_high, selector2, entry2_low, entry2_high);
+
+ return STATUS_NOT_IMPLEMENTED;
+}
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 5bac269..f1dafc8 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -332,7 +332,7 @@
@ stdcall NtSetInformationToken(long long ptr long)
@ stdcall NtSetIntervalProfile(long long)
@ stdcall NtSetIoCompletion(ptr long ptr long long)
-@ stub NtSetLdtEntries
+@ stdcall NtSetLdtEntries(long long long long long long)
@ stub NtSetLowEventPair
@ stub NtSetLowWaitHighEventPair
@ stub NtSetLowWaitHighThread
@@ -1209,7 +1209,7 @@
@ stdcall ZwSetInformationToken(long long ptr long) NtSetInformationToken
@ stdcall ZwSetIntervalProfile(long long) NtSetIntervalProfile
@ stdcall ZwSetIoCompletion(ptr long ptr long long) NtSetIoCompletion
-@ stub ZwSetLdtEntries
+@ stdcall ZwSetLdtEntries(long long long long long long) NtSetLdtEntries
@ stub ZwSetLowEventPair
@ stub ZwSetLowWaitHighEventPair
@ stub ZwSetLowWaitHighThread
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
index 29b24e7..ef4fa80 100644
--- a/include/ddk/wdm.h
+++ b/include/ddk/wdm.h
@@ -1333,6 +1333,7 @@ NTSTATUS WINAPI ZwSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID,
NTSTATUS WINAPI ZwSetInformationProcess(HANDLE,PROCESS_INFORMATION_CLASS,PVOID,ULONG);
NTSTATUS WINAPI ZwSetInformationThread(HANDLE,THREADINFOCLASS,LPCVOID,ULONG);
NTSTATUS WINAPI ZwSetIoCompletion(HANDLE,ULONG,ULONG,NTSTATUS,ULONG);
+NTSTATUS WINAPI ZwSetLdtEntries(ULONG,ULONG,ULONG,ULONG,ULONG,ULONG);
NTSTATUS WINAPI ZwSetSecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
NTSTATUS WINAPI ZwSetSystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG);
NTSTATUS WINAPI ZwSetSystemTime(const LARGE_INTEGER*,LARGE_INTEGER*);
diff --git a/include/winternl.h b/include/winternl.h
index 5a27f94..ddc7c18 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2228,7 +2228,7 @@ NTSYSAPI NTSTATUS WINAPI NtSetInformationThread(HANDLE,THREADINFOCLASS,LPCVOID,
NTSYSAPI NTSTATUS WINAPI NtSetInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG);
NTSYSAPI NTSTATUS WINAPI NtSetIntervalProfile(ULONG,KPROFILE_SOURCE);
NTSYSAPI NTSTATUS WINAPI NtSetIoCompletion(HANDLE,ULONG_PTR,ULONG_PTR,NTSTATUS,SIZE_T);
-NTSYSAPI NTSTATUS WINAPI NtSetLdtEntries(ULONG,LDT_ENTRY,ULONG,LDT_ENTRY);
+NTSYSAPI NTSTATUS WINAPI NtSetLdtEntries(ULONG,ULONG,ULONG,ULONG,ULONG,ULONG);
NTSYSAPI NTSTATUS WINAPI NtSetLowEventPair(HANDLE);
NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighEventPair(HANDLE);
NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighThread(VOID);
--
2.1.3

View File

@@ -1,2 +0,0 @@
Fixes: [26268] Add stub for NtSetLdtEntries/ZwSetLdtEntries
Category: stable

View File

@@ -1,63 +0,0 @@
From ce5aa07ac893aa38e72bb82c3e6dd2496ef4e1f5 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov@etersoft.ru>
Date: Sat, 31 Jan 2015 12:17:54 +0100
Subject: ntoskrnl.exe: Add stub for KeDelayExecutionThread.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 13 +++++++++++++
dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +-
include/ddk/wdm.h | 1 +
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 0d6f730..c90b351 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1308,6 +1308,19 @@ PRKTHREAD WINAPI KeGetCurrentThread(void)
return NULL;
}
+
+/***********************************************************************
+ * KeDelayExecutionThread (NTOSKRNL.EXE.@)
+ */
+NTSTATUS WINAPI KeDelayExecutionThread(KPROCESSOR_MODE WaitMode, BOOLEAN Alertable,
+ PLARGE_INTEGER Interval)
+{
+ FIXME("(%d, %d, %p): stub\n", WaitMode, Alertable, Interval);
+
+ return STATUS_SUCCESS;
+}
+
+
/***********************************************************************
* KeInitializeEvent (NTOSKRNL.EXE.@)
*/
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index 25624a6..bae3678 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -518,7 +518,7 @@
@ stub KeClearEvent
@ stub KeConnectInterrupt
@ stub KeDcacheFlushCount
-@ stub KeDelayExecutionThread
+@ stdcall KeDelayExecutionThread(long long ptr)
@ stub KeDeregisterBugCheckCallback
@ stub KeDeregisterBugCheckReasonCallback
@ stub KeDetachProcess
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
index f2eb6a5..0d13337 100644
--- a/include/ddk/wdm.h
+++ b/include/ddk/wdm.h
@@ -1219,6 +1219,7 @@ void WINAPI IoInitializeIrp(IRP*,USHORT,CCHAR);
VOID WINAPI IoInitializeRemoveLockEx(PIO_REMOVE_LOCK,ULONG,ULONG,ULONG,ULONG);
NTSTATUS WINAPI IoWMIRegistrationControl(PDEVICE_OBJECT,ULONG);
+NTSTATUS WINAPI KeDelayExecutionThread(KPROCESSOR_MODE,BOOLEAN,PLARGE_INTEGER);
PKTHREAD WINAPI KeGetCurrentThread(void);
void WINAPI KeQuerySystemTime(LARGE_INTEGER*);
void WINAPI KeQueryTickCount(LARGE_INTEGER*);
--
2.2.2

View File

@@ -1,46 +0,0 @@
From 0a2999e8266717769d3a8c245b70861552ad62fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 3 Apr 2015 17:08:20 +0200
Subject: ntoskrnl.exe: Add stub for PsRemoveLoadImageNotifyRoutine.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 9 +++++++++
dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 23c4c62..2692f47 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -2285,6 +2285,15 @@ NTSTATUS WINAPI IoWMIRegistrationControl(PDEVICE_OBJECT DeviceObject, ULONG Acti
}
/*****************************************************
+ * PsRemoveLoadImageNotifyRoutine (NTOSKRNL.EXE.@)
+ */
+NTSTATUS WINAPI PsRemoveLoadImageNotifyRoutine(PLOAD_IMAGE_NOTIFY_ROUTINE routine)
+{
+ FIXME("(%p) stub\n", routine);
+ return STATUS_SUCCESS;
+}
+
+/*****************************************************
* PsSetLoadImageNotifyRoutine (NTOSKRNL.EXE.@)
*/
NTSTATUS WINAPI PsSetLoadImageNotifyRoutine(PLOAD_IMAGE_NOTIFY_ROUTINE routine)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index 4d4320c..a284393 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -899,7 +899,7 @@
@ stub PsReferenceImpersonationToken
@ stub PsReferencePrimaryToken
@ stdcall PsRemoveCreateThreadNotifyRoutine(ptr)
-@ stub PsRemoveLoadImageNotifyRoutine
+@ stdcall PsRemoveLoadImageNotifyRoutine(ptr)
@ stub PsRestoreImpersonation
@ stub PsReturnPoolQuota
@ stub PsReturnProcessNonPagedPoolQuota
--
2.6.2

View File

@@ -2,11 +2,9 @@ Fixes: [32186] Add stub for ntoskrnl.KeWaitForMultipleObjects
Fixes: Implement stub for ntoskrnl.IoGetAttachedDeviceReference
Fixes: Implement stubs for ntoskrnl.Ex{Acquire,Release}FastMutexUnsafe
Fixes: Implement stubs for ntoskrnl.ObReferenceObjectByPointer and ntoskrnl.ObDereferenceObject
Fixes: Implement stub for ntoskrnl.KeDelayExecutionThread.
Fixes: Fix wrong defition of ntoskrnl.IoReleaseCancelSpinLock function.
Fixes: Add stub for ntoskrnl.ExAcquireResourceExclusiveLite
Fixes: Add stub for ntoskrnl.ExReleaseResourceForThread
Fixes: Add stub for ntoskrnl.ExDeleteResourceLite
Fixes: Add stub for ntoskrnl.Mm{Map,Unmap}LockedPages
Fixes: Implement ntoskrnl.KeInitializeMutex
Fixes: Add stub for ntoskrnl.PsRemoveLoadImageNotifyRoutine

View File

@@ -41,7 +41,8 @@ usage()
echo ""
echo "Backends:"
echo " --backend=patch Use regular 'patch' utility to apply patches (default)"
echo " --backend=epatch Use 'epatch' to apply patches (Gentoo only)"
echo " --backend=eapply Use 'eapply' to apply patches (Gentoo only)"
echo " --backend=epatch Use 'epatch' to apply patches (Gentoo only, deprecated)"
echo " --backend=git-am Use 'git am' to apply patches"
echo " --backend=git-apply Use 'git apply' to apply patches"
echo " --backend=stg Import the patches using stacked git"
@@ -51,13 +52,13 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "24a730187e08699b51c698d4fed58ba2947f0c5d"
echo "c03303838dc648b4dc9fc8d0c78b4ec51a455253"
}
# Show version information
version()
{
echo "Wine Staging 1.8.2"
echo "Wine Staging 1.8.4"
echo "Copyright (C) 2014-2016 the Wine Staging project authors."
echo ""
echo "Patchset to be applied on upstream Wine:"
@@ -90,7 +91,6 @@ patch_enable_all ()
enable_advapi32_RegCreateKeyTransacted="$1"
enable_advapi32_SetSecurityInfo="$1"
enable_amstream_GetMultiMediaStream="$1"
enable_api_ms_win_crt_Stub_DLLs="$1"
enable_authz_Stub_Functions="$1"
enable_browseui_Progress_Dialog="$1"
enable_comctl32_Button_Theming="$1"
@@ -126,7 +126,6 @@ patch_enable_all ()
enable_ddraw_Write_Vtable="$1"
enable_ddraw_ZBufferBitDepths="$1"
enable_ddraw_d3d_execute_buffer="$1"
enable_dinput_DIPROP_USERNAME="$1"
enable_dinput_Initialize="$1"
enable_dsound_EAX="$1"
enable_dsound_Fast_Mixer="$1"
@@ -153,8 +152,6 @@ patch_enable_all ()
enable_kernel32_CompareStringEx="$1"
enable_kernel32_CopyFileEx="$1"
enable_kernel32_Cwd_Startup_Info="$1"
enable_kernel32_FreeUserPhysicalPages="$1"
enable_kernel32_GetFinalPathNameByHandle="$1"
enable_kernel32_GetLargestConsoleWindowSize="$1"
enable_kernel32_LocaleNameToLCID="$1"
enable_kernel32_Named_Pipe="$1"
@@ -200,7 +197,6 @@ patch_enable_all ()
enable_ntdll_Loader_Machine_Type="$1"
enable_ntdll_NtQueryEaFile="$1"
enable_ntdll_NtQuerySection="$1"
enable_ntdll_NtSetLdtEntries="$1"
enable_ntdll_Pipe_SpecialCharacters="$1"
enable_ntdll_ProcessDebugFlags="$1"
enable_ntdll_ProcessQuotaLimits="$1"
@@ -232,7 +228,6 @@ patch_enable_all ()
enable_rasapi32_RasEnumDevicesA="$1"
enable_riched20_IText_Interface="$1"
enable_rpcrt4_Pipe_Transport="$1"
enable_secur32_ANSI_NTLM_Credentials="$1"
enable_server_ClipCursor="$1"
enable_server_CreateProcess_ACLs="$1"
enable_server_Desktop_Refcount="$1"
@@ -304,7 +299,6 @@ patch_enable_all ()
enable_wined3d_CSMT_Helper="$1"
enable_wined3d_CSMT_Main="$1"
enable_wined3d_DXTn="$1"
enable_wined3d_Geforce_425M="$1"
enable_wined3d_MESA_GPU_Info="$1"
enable_wined3d_Revert_PixelFormat="$1"
enable_wined3d_UnhandledBlendFactor="$1"
@@ -326,13 +320,10 @@ patch_enable_all ()
enable_wininet_Internet_Settings="$1"
enable_wininet_ParseX509EncodedCertificateForListBoxEntry="$1"
enable_winmm_Delay_Import_Depends="$1"
enable_winscard_SCardListReaders="$1"
enable_winspool_drv_SetPrinterW="$1"
enable_winsta_WinStationEnumerateW="$1"
enable_wpcap_Dynamic_Linking="$1"
enable_ws2_32_APC_Performance="$1"
enable_ws2_32_Connect_Time="$1"
enable_ws2_32_Sort_default_route="$1"
enable_ws2_32_TransmitFile="$1"
enable_ws2_32_WSACleanup="$1"
enable_ws2_32_WSAPoll="$1"
@@ -379,9 +370,6 @@ patch_enable ()
amstream-GetMultiMediaStream)
enable_amstream_GetMultiMediaStream="$2"
;;
api-ms-win-crt-Stub_DLLs)
enable_api_ms_win_crt_Stub_DLLs="$2"
;;
authz-Stub_Functions)
enable_authz_Stub_Functions="$2"
;;
@@ -490,9 +478,6 @@ patch_enable ()
ddraw-d3d_execute_buffer)
enable_ddraw_d3d_execute_buffer="$2"
;;
dinput-DIPROP_USERNAME)
enable_dinput_DIPROP_USERNAME="$2"
;;
dinput-Initialize)
enable_dinput_Initialize="$2"
;;
@@ -571,12 +556,6 @@ patch_enable ()
kernel32-Cwd_Startup_Info)
enable_kernel32_Cwd_Startup_Info="$2"
;;
kernel32-FreeUserPhysicalPages)
enable_kernel32_FreeUserPhysicalPages="$2"
;;
kernel32-GetFinalPathNameByHandle)
enable_kernel32_GetFinalPathNameByHandle="$2"
;;
kernel32-GetLargestConsoleWindowSize)
enable_kernel32_GetLargestConsoleWindowSize="$2"
;;
@@ -712,9 +691,6 @@ patch_enable ()
ntdll-NtQuerySection)
enable_ntdll_NtQuerySection="$2"
;;
ntdll-NtSetLdtEntries)
enable_ntdll_NtSetLdtEntries="$2"
;;
ntdll-Pipe_SpecialCharacters)
enable_ntdll_Pipe_SpecialCharacters="$2"
;;
@@ -808,9 +784,6 @@ patch_enable ()
rpcrt4-Pipe_Transport)
enable_rpcrt4_Pipe_Transport="$2"
;;
secur32-ANSI_NTLM_Credentials)
enable_secur32_ANSI_NTLM_Credentials="$2"
;;
server-ClipCursor)
enable_server_ClipCursor="$2"
;;
@@ -1024,9 +997,6 @@ patch_enable ()
wined3d-DXTn)
enable_wined3d_DXTn="$2"
;;
wined3d-Geforce_425M)
enable_wined3d_Geforce_425M="$2"
;;
wined3d-MESA_GPU_Info)
enable_wined3d_MESA_GPU_Info="$2"
;;
@@ -1090,15 +1060,9 @@ patch_enable ()
winmm-Delay_Import_Depends)
enable_winmm_Delay_Import_Depends="$2"
;;
winscard-SCardListReaders)
enable_winscard_SCardListReaders="$2"
;;
winspool.drv-SetPrinterW)
enable_winspool_drv_SetPrinterW="$2"
;;
winsta-WinStationEnumerateW)
enable_winsta_WinStationEnumerateW="$2"
;;
wpcap-Dynamic_Linking)
enable_wpcap_Dynamic_Linking="$2"
;;
@@ -1108,9 +1072,6 @@ patch_enable ()
ws2_32-Connect_Time)
enable_ws2_32_Connect_Time="$2"
;;
ws2_32-Sort_default_route)
enable_ws2_32_Sort_default_route="$2"
;;
ws2_32-TransmitFile)
enable_ws2_32_TransmitFile="$2"
;;
@@ -1236,7 +1197,7 @@ elif test ! -f "$DESTDIR/tools/make_requests"; then
abort "DESTDIR does not point to the Wine source tree."
fi
# Change directory to DESTDIR, epatch depends on that
# Change directory to DESTDIR, eapply/epatch depends on that
if ! cd "$DESTDIR"; then
abort "Unable to change directory to $DESTDIR."
fi
@@ -1351,8 +1312,8 @@ if test "$backend" = "patch"; then
fi
}
# 'epatch' backend - used on Gentoo
elif test "$backend" = "epatch"; then
# 'eapply/epatch' backend - used on Gentoo
elif test "$backend" = "eapply" -o "$backend" = "epatch"; then
if test "$workaround_git_bug" -eq 0; then
gitapply_args="--nogit"
@@ -1360,11 +1321,11 @@ elif test "$backend" = "epatch"; then
gitapply_args=""
fi
if ! command -v epatch >/dev/null 2>&1 || \
! command -v ebegin >/dev/null 2>&1 || \
! command -v eend >/dev/null 2>&1 || \
! command -v die >/dev/null 2>&1; then
abort "Shell functions epatch/ebegin/eend not found. You have to source this script from your ebuild."
if ! command -v "$backend" >/dev/null 2>&1 || \
! command -v ebegin >/dev/null 2>&1 || \
! command -v eend >/dev/null 2>&1 || \
! command -v nonfatal >/dev/null 2>&1; then
abort "Shell functions $backend/ebegin/eend/nonfatal not found. You have to source this script from your ebuild."
fi
if test "$enable_autoconf" -gt 1; then
@@ -1377,13 +1338,15 @@ elif test "$backend" = "epatch"; then
_shortname="$(basename "$1")"
if grep -q "^GIT binary patch" "$1"; then
ebegin "Applying $_shortname"
if ! "$patchdir/gitapply.sh" $gitapply_args < "$1"; then
die "Failed Patch: $1!"
"$patchdir/gitapply.sh" $gitapply_args < "$1"
if ! eend $?; then
exit 1
fi
eend
else
epatch "$1" # epatch calls die upon failure
# we are run from a subshell, so we can't call die
if ! nonfatal "$backend" "$1"; then
exit 1
fi
fi
unset _shortname
}
@@ -1587,9 +1550,6 @@ if test "$enable_category_stable" -eq 1; then
if test "$enable_ntdll_Heap_FreeLists" -gt 1; then
abort "Patchset ntdll-Heap_FreeLists disabled, but category-stable depends on that."
fi
if test "$enable_ntdll_NtSetLdtEntries" -gt 1; then
abort "Patchset ntdll-NtSetLdtEntries disabled, but category-stable depends on that."
fi
if test "$enable_ntdll_Pipe_SpecialCharacters" -gt 1; then
abort "Patchset ntdll-Pipe_SpecialCharacters disabled, but category-stable depends on that."
fi
@@ -1716,7 +1676,6 @@ if test "$enable_category_stable" -eq 1; then
enable_ntdll_Fix_Alignment=1
enable_ntdll_FreeBSD_Directory=1
enable_ntdll_Heap_FreeLists=1
enable_ntdll_NtSetLdtEntries=1
enable_ntdll_Pipe_SpecialCharacters=1
enable_ntdll_RtlIpStringToAddress=1
enable_ntdll_Threading=1
@@ -2325,18 +2284,6 @@ if test "$enable_amstream_GetMultiMediaStream" -eq 1; then
) >> "$patchlist"
fi
# Patchset api-ms-win-crt-Stub_DLLs
# |
# | Modified files:
# | * dlls/ucrtbase/ucrtbase.spec
# |
if test "$enable_api_ms_win_crt_Stub_DLLs" -eq 1; then
patch_apply api-ms-win-crt-Stub_DLLs/0001-ucrtbase-Hook-up-some-functions-with-new-names-to-ex.patch
(
echo '+ { "Martin Storsjo", "ucrtbase: Hook up some functions with new names to existing implementations.", 1 },';
) >> "$patchlist"
fi
# Patchset authz-Stub_Functions
# |
# | Modified files:
@@ -2899,21 +2846,6 @@ if test "$enable_ddraw_d3d_execute_buffer" -eq 1; then
) >> "$patchlist"
fi
# Patchset dinput-DIPROP_USERNAME
# |
# | This patchset fixes the following Wine bugs:
# | * [#39667] Implement dinput device property DIPROP_USERNAME
# |
# | Modified files:
# | * dlls/dinput/device.c, dlls/dinput/device_private.h, dlls/dinput8/tests/device.c
# |
if test "$enable_dinput_DIPROP_USERNAME" -eq 1; then
patch_apply dinput-DIPROP_USERNAME/0001-dinput-Implement-device-property-DIPROP_USERNAME.patch
(
echo '+ { "Bernhard Ăśbelacker", "dinput: Implement device property DIPROP_USERNAME.", 1 },';
) >> "$patchlist"
fi
# Patchset dinput-Initialize
# |
# | This patchset fixes the following Wine bugs:
@@ -3448,37 +3380,6 @@ if test "$enable_kernel32_Cwd_Startup_Info" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-FreeUserPhysicalPages
# |
# | This patchset fixes the following Wine bugs:
# | * [#39543] Add stub kernel32.FreeUserPhysicalPages
# |
# | Modified files:
# | * dlls/kernel32/heap.c, dlls/kernel32/kernel32.spec
# |
if test "$enable_kernel32_FreeUserPhysicalPages" -eq 1; then
patch_apply kernel32-FreeUserPhysicalPages/0001-kernel32-add-FreeUserPhysicalPages-stub-try-2.patch
(
echo '+ { "Austin English", "kernel32: Add FreeUserPhysicalPages stub.", 2 },';
) >> "$patchlist"
fi
# Patchset kernel32-GetFinalPathNameByHandle
# |
# | This patchset fixes the following Wine bugs:
# | * [#34851] Support for GetFinalPathNameByHandle
# |
# | Modified files:
# | * dlls/api-ms-win-core-file-l1-1-0/api-ms-win-core-file-l1-1-0.spec, dlls/api-ms-win-core-file-l1-2-0/api-ms-win-core-
# | file-l1-2-0.spec, dlls/kernel32/file.c, dlls/kernel32/kernel32.spec
# |
if test "$enable_kernel32_GetFinalPathNameByHandle" -eq 1; then
patch_apply kernel32-GetFinalPathNameByHandle/0001-kernel32-Implement-GetFinalPathNameByHandle.patch
(
echo '+ { "Michael MĂĽller", "kernel32: Implement GetFinalPathNameByHandle.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-GetLargestConsoleWindowSize
# |
# | This patchset fixes the following Wine bugs:
@@ -4295,21 +4196,6 @@ if test "$enable_ntdll_NtQuerySection" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-NtSetLdtEntries
# |
# | This patchset fixes the following Wine bugs:
# | * [#26268] Add stub for NtSetLdtEntries/ZwSetLdtEntries
# |
# | Modified files:
# | * dlls/ntdll/nt.c, dlls/ntdll/ntdll.spec, include/ddk/wdm.h, include/winternl.h
# |
if test "$enable_ntdll_NtSetLdtEntries" -eq 1; then
patch_apply ntdll-NtSetLdtEntries/0001-ntdll-add-NtSetLdtEntries-ZwSetLdtEntries-stub-try-2.patch
(
echo '+ { "Austin English", "ntdll: Add NtSetLdtEntries/ZwSetLdtEntries stub.", 2 },';
) >> "$patchlist"
fi
# Patchset ntdll-Pipe_SpecialCharacters
# |
# | This patchset fixes the following Wine bugs:
@@ -4553,27 +4439,23 @@ if test "$enable_ntoskrnl_Stubs" -eq 1; then
patch_apply ntoskrnl-Stubs/0002-ntoskrnl.exe-Add-stub-for-IoGetAttachedDeviceReferen.patch
patch_apply ntoskrnl-Stubs/0003-ntoskrnl.exe-Add-stubs-for-ExAcquireFastMutexUnsafe-.patch
patch_apply ntoskrnl-Stubs/0004-ntoskrnl.exe-Add-stubs-for-ObReferenceObjectByPointe.patch
patch_apply ntoskrnl-Stubs/0005-ntoskrnl.exe-Add-stub-for-KeDelayExecutionThread.patch
patch_apply ntoskrnl-Stubs/0006-ntoskrnl.exe-Improve-KeReleaseMutex-stub.patch
patch_apply ntoskrnl-Stubs/0007-ntoskrnl.exe-Improve-KeInitializeSemaphore-stub.patch
patch_apply ntoskrnl-Stubs/0008-ntoskrnl.exe-Improve-KeInitializeTimerEx-stub.patch
patch_apply ntoskrnl-Stubs/0009-ntoskrnl.exe-Fix-IoReleaseCancelSpinLock-argument.patch
patch_apply ntoskrnl-Stubs/0010-ntoskrnl.exe-Implement-MmMapLockedPages-and-MmUnmapL.patch
patch_apply ntoskrnl-Stubs/0011-ntoskrnl.exe-Implement-KeInitializeMutex.patch
patch_apply ntoskrnl-Stubs/0012-ntoskrnl.exe-Add-stub-for-PsRemoveLoadImageNotifyRou.patch
(
echo '+ { "Austin English", "ntoskrnl.exe: Add KeWaitForMultipleObjects stub.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Add stub for IoGetAttachedDeviceReference.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Add stubs for ExAcquireFastMutexUnsafe and ExReleaseFastMutexUnsafe.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Add stubs for ObReferenceObjectByPointer and ObDereferenceObject.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Add stub for KeDelayExecutionThread.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Improve KeReleaseMutex stub.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Improve KeInitializeSemaphore stub.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Improve KeInitializeTimerEx stub.", 1 },';
echo '+ { "Christian Costa", "ntoskrnl.exe: Fix IoReleaseCancelSpinLock argument.", 1 },';
echo '+ { "Christian Costa", "ntoskrnl.exe: Implement MmMapLockedPages and MmUnmapLockedPages.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Implement KeInitializeMutex.", 1 },';
echo '+ { "Michael MĂĽller", "ntoskrnl.exe: Add stub for PsRemoveLoadImageNotifyRoutine.", 1 },';
) >> "$patchlist"
fi
@@ -4829,21 +4711,6 @@ if test "$enable_riched20_IText_Interface" -eq 1; then
) >> "$patchlist"
fi
# Patchset secur32-ANSI_NTLM_Credentials
# |
# | This patchset fixes the following Wine bugs:
# | * [#37063] Fix handling of ANSI NTLM credentials
# |
# | Modified files:
# | * dlls/secur32/ntlm.c
# |
if test "$enable_secur32_ANSI_NTLM_Credentials" -eq 1; then
patch_apply secur32-ANSI_NTLM_Credentials/0001-secur32-Fix-handling-of-ANSI-NTLM-credentials.patch
(
echo '+ { "David Woodhouse", "secur32: Fix handling of ANSI NTLM credentials.", 1 },';
) >> "$patchlist"
fi
# Patchset server-ClipCursor
# |
# | This patchset fixes the following Wine bugs:
@@ -4951,25 +4818,15 @@ fi
# Patchset server-Parent_Process
# |
# | This patchset fixes the following Wine bugs:
# | * [#37087] Do not hold reference on parent process in wineserver
# |
# | Modified files:
# | * dlls/kernel32/tests/process.c, server/console.c, server/process.c, server/process.h, server/snapshot.c, server/thread.c,
# | server/token.c
# | * dlls/kernel32/tests/process.c, server/process.c
# |
if test "$enable_server_Parent_Process" -eq 1; then
patch_apply server-Parent_Process/0001-kernel32-tests-Remove-unnecessary-call-to-GetExitCod.patch
patch_apply server-Parent_Process/0002-kernel32-tests-Add-test-for-process-object-destructi.patch
patch_apply server-Parent_Process/0003-server-token_duplicate-should-not-reference-the-orig.patch
patch_apply server-Parent_Process/0004-server-Increase-size-of-PID-table-to-512-to-reduce-r.patch
patch_apply server-Parent_Process/0005-server-Do-not-hold-reference-on-parent-process.patch
patch_apply server-Parent_Process/0003-server-Increase-size-of-PID-table-to-512-to-reduce-r.patch
(
echo '+ { "Sebastian Lackner", "kernel32/tests: Remove unnecessary call to GetExitCodeProcess in process tests.", 1 },';
echo '+ { "Sebastian Lackner", "kernel32/tests: Add test for process object destruction.", 1 },';
echo '+ { "Sebastian Lackner", "server: Token_duplicate should not reference the original token, which will get destroyed on process exit.", 1 },';
echo '+ { "Sebastian Lackner", "server: Increase size of PID table to 512 to reduce risk of collisions.", 1 },';
echo '+ { "Sebastian Lackner", "server: Do not hold reference on parent process.", 1 },';
) >> "$patchlist"
fi
@@ -5839,21 +5696,6 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-Geforce_425M
# |
# | This patchset fixes the following Wine bugs:
# | * [#35054] Add wined3d detection for GeForce GT 425M
# |
# | Modified files:
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_private.h
# |
if test "$enable_wined3d_Geforce_425M" -eq 1; then
patch_apply wined3d-Geforce_425M/0001-wined3d-Add-detection-for-NVIDIA-GeForce-425M.patch
(
echo '+ { "Jarkko Korpi", "wined3d: Add detection for NVIDIA GeForce 425M.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-MESA_GPU_Info
# |
# | This patchset has the following (direct or indirect) dependencies:
@@ -6550,21 +6392,6 @@ if test "$enable_winmm_Delay_Import_Depends" -eq 1; then
) >> "$patchlist"
fi
# Patchset winscard-SCardListReaders
# |
# | This patchset fixes the following Wine bugs:
# | * [#26978] Add stub for winscard.SCardListReadersA/W
# |
# | Modified files:
# | * dlls/winscard/winscard.c, dlls/winscard/winscard.spec
# |
if test "$enable_winscard_SCardListReaders" -eq 1; then
patch_apply winscard-SCardListReaders/0001-winscard-add-stubs-for-SCardListReadersA-W.patch
(
echo '+ { "Austin English", "winscard: Add stubs for SCardListReadersA/W.", 1 },';
) >> "$patchlist"
fi
# Patchset winspool.drv-SetPrinterW
# |
# | This patchset fixes the following Wine bugs:
@@ -6580,21 +6407,6 @@ if test "$enable_winspool_drv_SetPrinterW" -eq 1; then
) >> "$patchlist"
fi
# Patchset winsta-WinStationEnumerateW
# |
# | This patchset fixes the following Wine bugs:
# | * [#38102] Add stub for winsta.WinStationEnumerateW
# |
# | Modified files:
# | * dlls/winsta/main.c, dlls/winsta/winsta.spec
# |
if test "$enable_winsta_WinStationEnumerateW" -eq 1; then
patch_apply winsta-WinStationEnumerateW/0001-winsta-Add-stub-for-WinStationEnumerateW.patch
(
echo '+ { "Austin English", "winsta: Add stub for WinStationEnumerateW.", 2 },';
) >> "$patchlist"
fi
# Patchset wpcap-Dynamic_Linking
# |
# | Modified files:
@@ -6631,22 +6443,6 @@ if test "$enable_ws2_32_Connect_Time" -eq 1; then
) >> "$patchlist"
fi
# Patchset ws2_32-Sort_default_route
# |
# | This patchset fixes the following Wine bugs:
# | * [#22819] Ensure default route IP addresses are returned first in gethostbyname
# | * [#37271] Fix issue causing applications to report magic loopback address instead of real IP
# |
# | Modified files:
# | * dlls/ws2_32/socket.c, dlls/ws2_32/tests/sock.c
# |
if test "$enable_ws2_32_Sort_default_route" -eq 1; then
patch_apply ws2_32-Sort_default_route/0001-ws2_32-Ensure-default-route-IP-addresses-are-returne.patch
(
echo '+ { "Bruno Jesus", "ws2_32: Ensure default route IP addresses are returned first in gethostbyname.", 1 },';
) >> "$patchlist"
fi
# Patchset ws2_32-TransmitFile
# |
# | This patchset has the following (direct or indirect) dependencies:

View File

@@ -1,104 +0,0 @@
From 84e4f321118a11991a34e24dd1729181ad8a1574 Mon Sep 17 00:00:00 2001
From: David Woodhouse <dwmw2@infradead.org>
Date: Fri, 8 Aug 2014 13:21:56 +0100
Subject: secur32: Fix handling of ANSI NTLM credentials
One of many issues covered in bug 37063... we assume that the
credentials are in Unicode, instead of looking at the Flags field.
---
dlls/secur32/ntlm.c | 69 ++++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 58 insertions(+), 11 deletions(-)
diff --git a/dlls/secur32/ntlm.c b/dlls/secur32/ntlm.c
index 0fe64ed..72e9706 100644
--- a/dlls/secur32/ntlm.c
+++ b/dlls/secur32/ntlm.c
@@ -174,27 +174,74 @@ SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleW(
if(pAuthData != NULL)
{
PSEC_WINNT_AUTH_IDENTITY_W auth_data = pAuthData;
+ LPWSTR domain = NULL, user = NULL, password = NULL;
+ int domain_len = 0, user_len = 0, password_len = 0;
- TRACE("Username is %s\n", debugstr_wn(auth_data->User, auth_data->UserLength));
- TRACE("Domain name is %s\n", debugstr_wn(auth_data->Domain, auth_data->DomainLength));
+ if (auth_data->Flags & SEC_WINNT_AUTH_IDENTITY_ANSI)
+ {
+ if (auth_data->DomainLength)
+ {
+ domain_len = MultiByteToWideChar(CP_ACP, 0, (char *)auth_data->Domain,
+ auth_data->DomainLength, NULL, 0);
+ domain = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * domain_len);
+ MultiByteToWideChar(CP_ACP, 0, (char *)auth_data->Domain, auth_data->DomainLength,
+ domain, domain_len);
+ }
+
+ if (auth_data->UserLength)
+ {
+ user_len = MultiByteToWideChar(CP_ACP, 0, (char *)auth_data->User,
+ auth_data->UserLength, NULL, 0);
+ user = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * user_len);
+ MultiByteToWideChar(CP_ACP, 0, (char *)auth_data->User, auth_data->UserLength,
+ user, user_len);
+ }
+
+ if (auth_data->PasswordLength)
+ {
+ password_len = MultiByteToWideChar(CP_ACP, 0,(char *)auth_data->Password,
+ auth_data->PasswordLength, NULL, 0);
+ password = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * password_len);
+ MultiByteToWideChar(CP_ACP, 0, (char *)auth_data->Password, auth_data->PasswordLength,
+ password, password_len);
+ }
+ }
+ else
+ {
+ domain = auth_data->Domain;
+ domain_len = auth_data->DomainLength;
+
+ user = auth_data->User;
+ user_len = auth_data->UserLength;
+
+ password = auth_data->Password;
+ password_len = auth_data->PasswordLength;
+ }
+
+ TRACE("Username is %s\n", debugstr_wn(user, user_len));
+ TRACE("Domain name is %s\n", debugstr_wn(domain, domain_len));
- ntlm_cred->username_arg = ntlm_GetUsernameArg(auth_data->User, auth_data->UserLength);
- ntlm_cred->domain_arg = ntlm_GetDomainArg(auth_data->Domain, auth_data->DomainLength);
+ ntlm_cred->username_arg = ntlm_GetUsernameArg(user, user_len);
+ ntlm_cred->domain_arg = ntlm_GetDomainArg(domain, domain_len);
- if(auth_data->PasswordLength != 0)
+ if(password_len != 0)
{
- ntlm_cred->pwlen = WideCharToMultiByte(CP_UNIXCP,
- WC_NO_BEST_FIT_CHARS, auth_data->Password,
- auth_data->PasswordLength, NULL, 0, NULL,
- NULL);
+ ntlm_cred->pwlen = WideCharToMultiByte(CP_UNIXCP, WC_NO_BEST_FIT_CHARS, password,
+ password_len, NULL, 0, NULL, NULL);
ntlm_cred->password = HeapAlloc(GetProcessHeap(), 0,
ntlm_cred->pwlen);
- WideCharToMultiByte(CP_UNIXCP, WC_NO_BEST_FIT_CHARS,
- auth_data->Password, auth_data->PasswordLength,
+ WideCharToMultiByte(CP_UNIXCP, WC_NO_BEST_FIT_CHARS, password, password_len,
ntlm_cred->password, ntlm_cred->pwlen, NULL, NULL);
}
+
+ if (auth_data->Flags & SEC_WINNT_AUTH_IDENTITY_ANSI)
+ {
+ HeapFree(GetProcessHeap(), 0, domain);
+ HeapFree(GetProcessHeap(), 0, user);
+ HeapFree(GetProcessHeap(), 0, password);
+ }
}
phCredential->dwUpper = fCredentialUse;
--
2.3.3

View File

@@ -1 +0,0 @@
Fixes: [37063] Fix handling of ANSI NTLM credentials

Some files were not shown because too many files have changed in this diff Show More