Rebase against 097006b1466854fbd80af8d85a729d85ec52b163.

This commit is contained in:
Sebastian Lackner 2015-11-16 16:58:47 +01:00
parent be377f28ee
commit 8aa631da85
7 changed files with 11 additions and 293 deletions

View File

@ -85,7 +85,7 @@ for more details.*
* Add support for process specific debug channels
* Add wined3d detection for GeForce GT 425M ([Wine Bug #35054](https://bugs.winehq.org/show_bug.cgi?id=35054))
* Adobe Reader needs ITextSelection_fnGetDuplicate implementation
* Allow dinput EnumDevices callback with broken calling convention ([Wine Bug #27664](https://bugs.winehq.org/show_bug.cgi?id=27664))
* ~~Allow dinput EnumDevices callback with broken calling convention~~ ([Wine Bug #27664](https://bugs.winehq.org/show_bug.cgi?id=27664))
* Allow non-nullterminated string as working directory in kernel32.create_startup_info
* Allow selection of audio device for PulseAudio backend
* Allow special characters in pipe names ([Wine Bug #28995](https://bugs.winehq.org/show_bug.cgi?id=28995))
@ -120,7 +120,7 @@ for more details.*
* Do not allow interruption of system APC in server_select ([Wine Bug #14697](https://bugs.winehq.org/show_bug.cgi?id=14697))
* Do not allow to deallocate thread stack for current thread
* Do not fail when a used context is passed to wglShareLists ([Wine Bug #11436](https://bugs.winehq.org/show_bug.cgi?id=11436))
* Do not require SeBackupPrivilege in load_registry and unload_registry ([Wine Bug #28729](https://bugs.winehq.org/show_bug.cgi?id=28729))
* ~~Do not require SeBackupPrivilege in load_registry and unload_registry~~ ([Wine Bug #28729](https://bugs.winehq.org/show_bug.cgi?id=28729))
* Do not signal threads until they are really gone
* Do not use unixfs for devices without mountpoint
* Do not wait for hook thread startup in IDirectInput8::Initialize ([Wine Bug #21403](https://bugs.winehq.org/show_bug.cgi?id=21403))

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
wine-staging (1.7.56) UNRELEASED; urgency=low
* Removed patch to allow dinput EnumDevices callback with broken calling
convention (accepted upstream).
* Added patch to fix required privileges for load_registry and unload_registry
wineserver call (accepted upstream).
-- Sebastian Lackner <sebastian@fds-team.de> Sun, 15 Nov 2015 21:20:51 +0100
wine-staging (1.7.55) unstable; urgency=low
* Added patch to revert "Prepare GL resources before calling
context_apply_fbo_state".

View File

@ -1,62 +0,0 @@
From 0904e4dd80d07f725dc31c78ffbfaa32b351ad94 Mon Sep 17 00:00:00 2001
From: Andrew Nguyen <arethusa26@gmail.com>
Date: Sun, 15 Nov 2015 07:18:13 +0100
Subject: dinput: Allow EnumDevices callback functions with broken calling
conventions.
---
dlls/dinput/dinput_main.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c
index aef9d10..1ed1034 100644
--- a/dlls/dinput/dinput_main.c
+++ b/dlls/dinput/dinput_main.c
@@ -339,6 +339,26 @@ static DWORD diactionformat_priorityW(LPDIACTIONFORMATW lpdiaf, DWORD genre)
return priorityFlags;
}
+#ifdef __i386__
+extern BOOL CDECL enum_callback_wrapper(void *callback, const void *instance, void *ref);
+__ASM_GLOBAL_FUNC( enum_callback_wrapper,
+ "pushl %ebp\n\t"
+ __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
+ __ASM_CFI(".cfi_rel_offset %ebp,0\n\t")
+ "movl %esp,%ebp\n\t"
+ __ASM_CFI(".cfi_def_cfa_register %ebp\n\t")
+ "pushl 16(%ebp)\n\t"
+ "pushl 12(%ebp)\n\t"
+ "movl 8(%ebp),%eax\n\t"
+ "call *%eax\n\t"
+ "leave\n\t"
+ __ASM_CFI(".cfi_def_cfa %esp,4\n\t")
+ __ASM_CFI(".cfi_same_value %ebp\n\t")
+ "ret" )
+#else
+#define enum_callback_wrapper(callback, instance, ref) (callback)((instance), (ref))
+#endif
+
/******************************************************************************
* IDirectInputA_EnumDevices
*/
@@ -371,7 +391,7 @@ static HRESULT WINAPI IDirectInputAImpl_EnumDevices(
TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name);
r = dinput_devices[i]->enum_deviceA(dwDevType, dwFlags, &devInstance, This->dwVersion, j);
if (r == S_OK)
- if (lpCallback(&devInstance,pvRef) == DIENUM_STOP)
+ if (enum_callback_wrapper(lpCallback, &devInstance, pvRef) == DIENUM_STOP)
return S_OK;
}
}
@@ -411,7 +431,7 @@ static HRESULT WINAPI IDirectInputWImpl_EnumDevices(
TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name);
r = dinput_devices[i]->enum_deviceW(dwDevType, dwFlags, &devInstance, This->dwVersion, j);
if (r == S_OK)
- if (lpCallback(&devInstance,pvRef) == DIENUM_STOP)
+ if (enum_callback_wrapper(lpCallback, &devInstance, pvRef) == DIENUM_STOP)
return S_OK;
}
}
--
2.6.2

View File

@ -1 +0,0 @@
Fixes: [27664] Allow dinput EnumDevices callback with broken calling convention

View File

@ -52,13 +52,13 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "a786dca935c3e9b3d85853db4b61700e590a1c8b"
echo "097006b1466854fbd80af8d85a729d85ec52b163"
}
# Show version information
version()
{
echo "Wine Staging 1.7.55"
echo "Wine Staging 1.7.56 (unreleased)"
echo "Copyright (C) 2014-2015 the Wine Staging project authors."
echo ""
echo "Patchset to be applied on upstream Wine:"
@ -126,7 +126,6 @@ patch_enable_all ()
enable_ddraw_Write_Vtable="$1"
enable_ddraw_ZBufferBitDepths="$1"
enable_ddraw_d3d_execute_buffer="$1"
enable_dinput_EnumDevice_Callback="$1"
enable_dinput_Initialize="$1"
enable_dsound_EAX="$1"
enable_dsound_Fast_Mixer="$1"
@ -250,7 +249,6 @@ patch_enable_all ()
enable_server_Pipe_ObjectName="$1"
enable_server_Realtime_Priority="$1"
enable_server_Registry_Notifications="$1"
enable_server_Registry_Privileges="$1"
enable_server_Shared_Memory="$1"
enable_server_Signal_Thread="$1"
enable_server_Stored_ACLs="$1"
@ -487,9 +485,6 @@ patch_enable ()
ddraw-d3d_execute_buffer)
enable_ddraw_d3d_execute_buffer="$2"
;;
dinput-EnumDevice_Callback)
enable_dinput_EnumDevice_Callback="$2"
;;
dinput-Initialize)
enable_dinput_Initialize="$2"
;;
@ -859,9 +854,6 @@ patch_enable ()
server-Registry_Notifications)
enable_server_Registry_Notifications="$2"
;;
server-Registry_Privileges)
enable_server_Registry_Privileges="$2"
;;
server-Shared_Memory)
enable_server_Shared_Memory="$2"
;;
@ -2880,21 +2872,6 @@ if test "$enable_ddraw_d3d_execute_buffer" -eq 1; then
) >> "$patchlist"
fi
# Patchset dinput-EnumDevice_Callback
# |
# | This patchset fixes the following Wine bugs:
# | * [#27664] Allow dinput EnumDevices callback with broken calling convention
# |
# | Modified files:
# | * dlls/dinput/dinput_main.c
# |
if test "$enable_dinput_EnumDevice_Callback" -eq 1; then
patch_apply dinput-EnumDevice_Callback/0001-dinput-Allow-EnumDevices-callback-functions-with-bro.patch
(
echo '+ { "Andrew Nguyen", "dinput: Allow EnumDevices callback functions with broken calling conventions.", 1 },';
) >> "$patchlist"
fi
# Patchset dinput-Initialize
# |
# | This patchset fixes the following Wine bugs:
@ -5042,21 +5019,6 @@ if test "$enable_server_Registry_Notifications" -eq 1; then
) >> "$patchlist"
fi
# Patchset server-Registry_Privileges
# |
# | This patchset fixes the following Wine bugs:
# | * [#28729] Do not require SeBackupPrivilege in load_registry and unload_registry
# |
# | Modified files:
# | * dlls/advapi32/tests/registry.c, server/registry.c
# |
if test "$enable_server_Registry_Privileges" -eq 1; then
patch_apply server-Registry_Privileges/0001-server-Do-not-require-SeBackupPrivilege-in-load_regi.patch
(
echo '+ { "Sebastian Lackner", "server: Do not require SeBackupPrivilege in load_registry and unload_registry.", 1 },';
) >> "$patchlist"
fi
# Patchset server-Signal_Thread
# |
# | Modified files:

View File

@ -1,187 +0,0 @@
From 71dfe4d8c48b19acb04773f769862b5a541cb4c9 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 14 Nov 2015 18:22:52 +0100
Subject: server: Do not require SeBackupPrivilege in load_registry and
unload_registry.
---
dlls/advapi32/tests/registry.c | 107 ++++++++++++++++++++++++-----------------
server/registry.c | 20 +-------
2 files changed, 65 insertions(+), 62 deletions(-)
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index 8808822..de32bd9 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -1513,39 +1513,6 @@ static void test_reg_delete_key(void)
RegCloseKey(key);
}
-static void test_reg_save_key(void)
-{
- DWORD ret;
-
- ret = RegSaveKeyA(hkey_main, "saved_key", NULL);
- ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret);
-}
-
-static void test_reg_load_key(void)
-{
- DWORD ret;
- HKEY hkHandle;
-
- ret = RegLoadKeyA(HKEY_LOCAL_MACHINE, "Test", "saved_key");
- ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret);
-
- ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Test", &hkHandle);
- ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret);
-
- RegCloseKey(hkHandle);
-}
-
-static void test_reg_unload_key(void)
-{
- DWORD ret;
-
- ret = RegUnLoadKeyA(HKEY_LOCAL_MACHINE, "Test");
- ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret);
-
- DeleteFileA("saved_key");
- DeleteFileA("saved_key.LOG");
-}
-
static BOOL set_privileges(LPCSTR privilege, BOOL set)
{
TOKEN_PRIVILEGES tp;
@@ -1580,6 +1547,66 @@ static BOOL set_privileges(LPCSTR privilege, BOOL set)
return TRUE;
}
+static void test_reg_save_key(void)
+{
+ DWORD ret;
+
+ if (!set_privileges(SE_BACKUP_NAME, TRUE) ||
+ !set_privileges(SE_RESTORE_NAME, FALSE))
+ {
+ win_skip("Failed to set SE_BACKUP_NAME privileges, skipping tests\n");
+ return;
+ }
+
+ ret = RegSaveKeyA(hkey_main, "saved_key", NULL);
+ ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret);
+
+ set_privileges(SE_BACKUP_NAME, FALSE);
+}
+
+static void test_reg_load_key(void)
+{
+ DWORD ret;
+ HKEY hkHandle;
+
+ if (!set_privileges(SE_RESTORE_NAME, TRUE) ||
+ !set_privileges(SE_BACKUP_NAME, FALSE))
+ {
+ win_skip("Failed to set SE_RESTORE_NAME privileges, skipping tests\n");
+ return;
+ }
+
+ ret = RegLoadKeyA(HKEY_LOCAL_MACHINE, "Test", "saved_key");
+ ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret);
+
+ set_privileges(SE_RESTORE_NAME, FALSE);
+
+ ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Test", &hkHandle);
+ ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret);
+
+ RegCloseKey(hkHandle);
+}
+
+static void test_reg_unload_key(void)
+{
+ DWORD ret;
+
+ if (!set_privileges(SE_RESTORE_NAME, TRUE) ||
+ !set_privileges(SE_BACKUP_NAME, FALSE))
+ {
+ win_skip("Failed to set SE_RESTORE_NAME privileges, skipping tests\n");
+ return;
+ }
+
+ ret = RegUnLoadKeyA(HKEY_LOCAL_MACHINE, "Test");
+ ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret);
+
+ set_privileges(SE_RESTORE_NAME, FALSE);
+
+ DeleteFileA("saved_key");
+ DeleteFileA("saved_key.LOG");
+}
+
/* tests that show that RegConnectRegistry and
OpenSCManager accept computer names without the
\\ prefix (what MSDN says). */
@@ -3276,17 +3303,9 @@ START_TEST(registry)
test_classesroot_enum();
test_classesroot_mask();
- /* SaveKey/LoadKey require the SE_BACKUP_NAME privilege to be set */
- if (set_privileges(SE_BACKUP_NAME, TRUE) &&
- set_privileges(SE_RESTORE_NAME, TRUE))
- {
- test_reg_save_key();
- test_reg_load_key();
- test_reg_unload_key();
-
- set_privileges(SE_BACKUP_NAME, FALSE);
- set_privileges(SE_RESTORE_NAME, FALSE);
- }
+ test_reg_save_key();
+ test_reg_load_key();
+ test_reg_unload_key();
test_reg_delete_tree();
test_rw_order();
diff --git a/server/registry.c b/server/registry.c
index c95e103..a3c1390 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -2182,17 +2182,9 @@ DECL_HANDLER(delete_key_value)
DECL_HANDLER(load_registry)
{
struct key *key, *parent;
- struct token *token = thread_get_impersonation_token( current );
struct unicode_str name;
- const LUID_AND_ATTRIBUTES privs[] =
- {
- { SeBackupPrivilege, 0 },
- { SeRestorePrivilege, 0 },
- };
-
- if (!token || !token_check_privileges( token, TRUE, privs,
- sizeof(privs)/sizeof(privs[0]), NULL ))
+ if (!thread_single_check_privilege( current, &SeRestorePrivilege ))
{
set_error( STATUS_PRIVILEGE_NOT_HELD );
return;
@@ -2214,16 +2206,8 @@ DECL_HANDLER(load_registry)
DECL_HANDLER(unload_registry)
{
struct key *key;
- struct token *token = thread_get_impersonation_token( current );
-
- const LUID_AND_ATTRIBUTES privs[] =
- {
- { SeBackupPrivilege, 0 },
- { SeRestorePrivilege, 0 },
- };
- if (!token || !token_check_privileges( token, TRUE, privs,
- sizeof(privs)/sizeof(privs[0]), NULL ))
+ if (!thread_single_check_privilege( current, &SeRestorePrivilege ))
{
set_error( STATUS_PRIVILEGE_NOT_HELD );
return;
--
2.6.2

View File

@ -1 +0,0 @@
Fixes: [28729] Do not require SeBackupPrivilege in load_registry and unload_registry