From 0836349fc9367b322aa5ead682edb6512751bbf4 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 11 Feb 2016 19:09:51 +0100 Subject: [PATCH] Added patch to improve WTSQueryUserToken stub. --- patches/patchinstall.sh | 19 ++++++++++++++ ...api32-Improve-WTSQueryUserToken-stub.patch | 26 +++++++++++++++++++ patches/wtsapi32-WTSQueryUserToken/definition | 1 + 3 files changed, 46 insertions(+) create mode 100644 patches/wtsapi32-WTSQueryUserToken/0001-wtsapi32-Improve-WTSQueryUserToken-stub.patch create mode 100644 patches/wtsapi32-WTSQueryUserToken/definition diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index ba51e503..fb8739ee 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -371,6 +371,7 @@ patch_enable_all () enable_ws2_32_getaddrinfo="$1" enable_ws2_32_getsockopt="$1" enable_wtsapi32_EnumerateProcesses="$1" + enable_wtsapi32_WTSQueryUserToken="$1" enable_wusa_MSU_Package_Installer="$1" } @@ -1257,6 +1258,9 @@ patch_enable () wtsapi32-EnumerateProcesses) enable_wtsapi32_EnumerateProcesses="$2" ;; + wtsapi32-WTSQueryUserToken) + enable_wtsapi32_WTSQueryUserToken="$2" + ;; wusa-MSU_Package_Installer) enable_wusa_MSU_Package_Installer="$2" ;; @@ -7180,6 +7184,21 @@ if test "$enable_wtsapi32_EnumerateProcesses" -eq 1; then ) >> "$patchlist" fi +# Patchset wtsapi32-WTSQueryUserToken +# | +# | This patchset fixes the following Wine bugs: +# | * [#39663] Improve WTSQueryUserToken stub to make GOG Galaxy happy +# | +# | Modified files: +# | * dlls/wtsapi32/wtsapi32.c +# | +if test "$enable_wtsapi32_WTSQueryUserToken" -eq 1; then + patch_apply wtsapi32-WTSQueryUserToken/0001-wtsapi32-Improve-WTSQueryUserToken-stub.patch + ( + echo '+ { "Sebastian Lackner", "wtsapi32: Improve WTSQueryUserToken stub.", 1 },'; + ) >> "$patchlist" +fi + # Patchset wusa-MSU_Package_Installer # | # | This patchset fixes the following Wine bugs: diff --git a/patches/wtsapi32-WTSQueryUserToken/0001-wtsapi32-Improve-WTSQueryUserToken-stub.patch b/patches/wtsapi32-WTSQueryUserToken/0001-wtsapi32-Improve-WTSQueryUserToken-stub.patch new file mode 100644 index 00000000..72d09729 --- /dev/null +++ b/patches/wtsapi32-WTSQueryUserToken/0001-wtsapi32-Improve-WTSQueryUserToken-stub.patch @@ -0,0 +1,26 @@ +From 83df2a25df1f0a9e057fbac19c2c1601373b9c38 Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Thu, 11 Feb 2016 19:07:36 +0100 +Subject: wtsapi32: Improve WTSQueryUserToken stub. + +--- + dlls/wtsapi32/wtsapi32.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dlls/wtsapi32/wtsapi32.c b/dlls/wtsapi32/wtsapi32.c +index c668604..e1a9cd2 100644 +--- a/dlls/wtsapi32/wtsapi32.c ++++ b/dlls/wtsapi32/wtsapi32.c +@@ -243,7 +243,8 @@ BOOL WINAPI WTSQuerySessionInformationW( + BOOL WINAPI WTSQueryUserToken(ULONG session_id, PHANDLE token) + { + FIXME("%u %p\n", session_id, token); +- return FALSE; ++ if (token) *token = GetCurrentProcessToken(); ++ return token != NULL; + } + + /************************************************************ +-- +2.7.1 + diff --git a/patches/wtsapi32-WTSQueryUserToken/definition b/patches/wtsapi32-WTSQueryUserToken/definition new file mode 100644 index 00000000..9376a73d --- /dev/null +++ b/patches/wtsapi32-WTSQueryUserToken/definition @@ -0,0 +1 @@ +Fixes: [39663] Improve WTSQueryUserToken stub to make GOG Galaxy happy