Compare commits

..

44 Commits
v4.17 ... v4.20

Author SHA1 Message Date
Alistair Leslie-Hughes
356f228262 Release v4.20 2019-11-16 14:10:37 +11:00
Alistair Leslie-Hughes
f94a274729 Rebase against 5725ed3b46309b62469e4f305cb0b5a9b292dd43 2019-11-14 12:08:19 +11:00
Alistair Leslie-Hughes
cec9c7c73e Restore ole32-STGPROP patch 0001 2019-11-13 16:13:53 +11:00
Zebediah Figura
411f2a9702 d3d9-Direct3DShaderValidatorCreate9: Add patch set. 2019-11-12 21:15:58 -06:00
Zebediah Figura
ef0e88407e Rebase against 292b728908563952f56b0585d072f3d7a08e93b2. 2019-11-12 19:56:51 -06:00
Zebediah Figura
8148194353 Rebase against 34ed1e37da1e1c1cfd641f1f16b0e00030cbb357. 2019-11-11 19:53:15 -06:00
Zebediah Figura
ca018c8079 ntdll-NtContinue: Fix arguments to NtContinue(). 2019-11-10 20:47:35 -06:00
Zebediah Figura
7a3f594df2 evenfd_synchronization: Fix rebase, again.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48069
2019-11-09 13:56:25 -06:00
Alistair Leslie-Hughes
01a3c15320 Rebase against 070cfc358c8ed67ba08a49ae78c20205ab4e2d00 2019-11-09 15:13:58 +11:00
Zebediah Figura
fb40c21c72 Fix some errors in the last rebase, and add more dependencies. 2019-11-07 20:28:05 -06:00
Alistair Leslie-Hughes
0a469905c2 Rebase against 88d30985ddd534e8bafed531e619846bc8d10839 2019-11-08 11:55:03 +11:00
Zebediah Figura
e1ac8f20fe ntdll-MemoryWorkingSetExInformation: Fix a typo. 2019-11-07 10:00:59 -06:00
Zebediah Figura
471dc198a8 ntdll-NtContinue: Also use NtContinue() to continue after an exception on x86_64.
Patch by David Torok.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47970
2019-11-06 21:50:56 -06:00
Zebediah Figura
6c44e84e74 ntdll-NtContinue: Get rid of the check for CONTEXT_FULL.
Returning an error (silently!) is not an improvement over printing a message
and doing nothing, especially since I suspect no caller is going to be able
to cope with NtContinue() returning.

More saliently, Legends of Runeterra apparently accidentally passes the wrong
CPU flag. We don't do anything with the CPU flag, and manual testing shows
that Windows doesn't validate it in NtGetContextThread() at least, so it
probably doesn't validate it here either.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47970
2019-11-06 21:50:52 -06:00
Zebediah Figura
0c89d96edc winebuild-Fake_Dlls: Put the RET at the end of the 64-bit syscall thunk back.
I will pretend I did not see that
2019-11-06 20:15:26 -06:00
Zebediah Figura
5fbf201ea8 winebuild-Fake_Dlls: Adjust the 64-bit syscall dispatcher to return to the first "ret" instruction.
Diagnosed by David Torok: https://bugs.winehq.org/show_bug.cgi?id=47970
2019-11-06 19:06:57 -06:00
Alistair Leslie-Hughes
8c5d374d5a Rebase agaisnt 7f469b689a2dccc0863952cd73e592df391dc607 2019-11-06 10:16:40 +11:00
Alistair Leslie-Hughes
ded2e22686 Rebase against 2b29d02aa5ba65465b4adc017cdca9a8932b0dbe 2019-11-05 12:23:05 +11:00
Alistair Leslie-Hughes
1f77584097 Release v4.19 2019-11-02 10:37:40 +11:00
Alistair Leslie-Hughes
6e793996ba Rebase against ccec532879ec14b2e79da08288152a69221ec4d1 2019-11-01 18:10:58 +11:00
Paul Gofman
6f1ebb84a2 Added ntdll-BitmaskAllocAreaSearch patchset. 2019-10-31 16:42:52 +03:00
Alistair Leslie-Hughes
d26687d90a Updated ntdll-User_Shared_Data patchset
Silence a noisy FIXME, by github user Guy1524
2019-10-31 11:48:18 +11:00
Alistair Leslie-Hughes
067a975495 Rebase against 666f7501d03983f84833a7a1952e78fd0650fde6 2019-10-30 11:26:22 +11:00
Alistair Leslie-Hughes
bc4e00ae02 Rebase against 5b62f89baa82daecd430897de0bb5cab32c5fc5e 2019-10-29 09:50:40 +11:00
Alistair Leslie-Hughes
086d99f83e Rebase against 237d5636271a1a78b02a0eb7feaab7dfb9dfed57 2019-10-28 09:12:06 +11:00
Alistair Leslie-Hughes
bc7627cdf1 Rebase against 717109ce79bbf92b5e3e93e49f96b78ece00a952 2019-10-24 08:29:06 +11:00
Alistair Leslie-Hughes
e380c1e9a7 Rebase against d82f06c07556408e9584d2a1f8b275df39c93d74 2019-10-23 10:20:30 +11:00
Alistair Leslie-Hughes
a568bd3e79 Rebase against 98c2c9a9c98d174851fa7a87db79599dd7d8af89 2019-10-22 09:01:23 +11:00
Alistair Leslie-Hughes
9807a02bb3 Release v4.18 2019-10-19 13:37:33 +11:00
Alistair Leslie-Hughes
eab8fd69f7 Rebase against 8c74027ba60a360f24cf232ee233e71262d8f1ff 2019-10-19 13:36:30 +11:00
Alistair Leslie-Hughes
b95882c061 Updated advapi32-LsaLookupSids patchset
Fix test in last rebase.
2019-10-18 10:10:00 +11:00
Alistair Leslie-Hughes
49b240d88c Rebase against 0fe003435e90dc32dd405a62af8fbcc20afc925d 2019-10-18 08:54:48 +11:00
Alistair Leslie-Hughes
c96aa29030 Added user32-InternalGetWindowIcon patchset 2019-10-14 10:40:38 +11:00
Alistair Leslie-Hughes
d432608737 Updated dinput-joy-mappings patchset 2019-10-11 14:20:41 +11:00
Alistair Leslie-Hughes
db09443c86 Updated ntdll-RtlIpv4StringToAddress reference 2019-10-11 13:34:43 +11:00
Alistair Leslie-Hughes
da73254259 Updated dinput-joy-mappings patchset
- Use heap_alloc/free
- Remove use of const buffers.
- Add "dinput: Dont allow Fixed actions to be changed."
2019-10-11 13:30:49 +11:00
Alistair Leslie-Hughes
a246130f81 Rebase against 89d9bcb1f19a03ffafa9a93a5f32049b4bfdaa00 2019-10-09 08:38:54 +11:00
Paul Gofman
042a633c8a Rebase against 15bf3eee2cf05ce98011458fc5e715f4524c4ebd 2019-10-04 02:11:27 +03:00
Zebediah Figura
cf04b8d6ac eventfd_synchronization: Cherry-pick some fixes. 2019-10-02 20:37:48 -05:00
Alistair Leslie-Hughes
6be963ebfd Rebase against 5e8eb5f4c54c3a6d3c92fd414372da2fbd5bd91a 2019-10-03 08:54:04 +10:00
Alistair Leslie-Hughes
5b066d6aed Disable user32-rawinput patchset
This is causing regressions across the board.
https://bugs.winehq.org/show_bug.cgi?id=47834

Star Craft 2, Borderlands, StarCitizen, Halo Online
2019-10-02 10:41:41 +10:00
Alistair Leslie-Hughes
c24cb89257 Rebase against b360cd67e8f7f8c01f09457bacb032fd4a248d0a 2019-10-02 10:11:40 +10:00
Paul Gofman
3d5bb83e05 Updated wined3d-zero-inf-shaders patchset.
Avoid infinity resulting from overflow in POW with multiply_setting set to 1.
2019-10-01 21:52:15 +03:00
Alistair Leslie-Hughes
0c7512f5f5 Updated user32-rawinput patchset 2019-09-29 18:06:18 +10:00
109 changed files with 2018 additions and 4294 deletions

View File

@@ -1,4 +1,4 @@
From 5e4c31d0796f2e559889d4f84cdb571130217e7d Mon Sep 17 00:00:00 2001
From 14f3c7debf91be0e5b36299f330541f3146d00ca Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 22 Mar 2016 21:58:40 +0100
Subject: [PATCH] dwrite: Avoid implicit cast of interface pointer.
@@ -9,10 +9,10 @@ Subject: [PATCH] dwrite: Avoid implicit cast of interface pointer.
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index f50133d..1bc7b59 100644
index be9ff88fe44..44c4426c9ff 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -1815,7 +1815,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
@@ -1781,7 +1781,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
if (!iface)
return NULL;
assert(iface->lpVtbl == (IDWriteFontVtbl*)&dwritefontvtbl);
@@ -21,7 +21,7 @@ index f50133d..1bc7b59 100644
}
struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
@@ -1823,7 +1823,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
@@ -1789,7 +1789,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
if (!iface)
return NULL;
assert(iface->lpVtbl == (IDWriteFontFaceVtbl*)&dwritefontfacevtbl);
@@ -31,18 +31,18 @@ index f50133d..1bc7b59 100644
void get_logfont_from_font(IDWriteFont *iface, LOGFONTW *lf)
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index f27fe9f..ee1eb5a 100644
index b9c712cd7fb..358d13963a7 100644
--- a/dlls/dwrite/layout.c
+++ b/dlls/dwrite/layout.c
@@ -5622,7 +5622,7 @@ static const IDWriteTextFormat2Vtbl dwritetextformatvtbl = {
@@ -5715,7 +5715,7 @@ static const IDWriteTextFormat3Vtbl dwritetextformatvtbl =
static struct dwrite_textformat *unsafe_impl_from_IDWriteTextFormat(IDWriteTextFormat *iface)
{
return (iface->lpVtbl == (IDWriteTextFormatVtbl*)&dwritetextformatvtbl) ?
- CONTAINING_RECORD(iface, struct dwrite_textformat, IDWriteTextFormat2_iface) : NULL;
+ CONTAINING_RECORD((IDWriteTextFormat2 *)iface, struct dwrite_textformat, IDWriteTextFormat2_iface) : NULL;
- CONTAINING_RECORD(iface, struct dwrite_textformat, IDWriteTextFormat3_iface) : NULL;
+ CONTAINING_RECORD((IDWriteTextFormat3 *)iface, struct dwrite_textformat, IDWriteTextFormat3_iface) : NULL;
}
HRESULT create_textformat(const WCHAR *family_name, IDWriteFontCollection *collection, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STYLE style,
--
1.9.1
2.23.0

View File

@@ -1,7 +1,7 @@
From 08d8e1c398ed6f3e237ad9fd3d29e10d09dcff3d Mon Sep 17 00:00:00 2001
From 40630c14377561e90a4be405d2124338002a88f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 2 May 2014 20:46:19 +0200
Subject: user32: Decrease minimum SetTimer interval to 5 ms. (try 2)
Subject: [PATCH] user32: Decrease minimum SetTimer interval to 5 ms. (try 2)
---
dlls/user32/message.c | 2 +-
@@ -9,10 +9,10 @@ Subject: user32: Decrease minimum SetTimer interval to 5 ms. (try 2)
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index d122980..aec0938 100644
index 1336865112a..cbe9920384f 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -4443,7 +4443,7 @@ UINT_PTR WINAPI SetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC proc )
@@ -4496,7 +4496,7 @@ UINT_PTR WINAPI SetCoalescableTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMER
if (proc) winproc = WINPROC_AllocProc( (WNDPROC)proc, FALSE );
@@ -22,25 +22,25 @@ index d122980..aec0938 100644
SERVER_START_REQ( set_win_timer )
{
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index d92fbc7..dbaddb7 100644
index c0ba5834cf9..a6bc158e8a7 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -8521,6 +8521,7 @@ static void test_timers(void)
@@ -10282,6 +10282,7 @@ static void test_timers(void)
start = GetTickCount();
while (GetTickCount()-start < 1001 && GetMessageA(&msg, info.hWnd, 0, 0))
DispatchMessageA(&msg);
+todo_wine
ok(abs(count-TIMER_COUNT_EXPECTED) < TIMER_COUNT_TOLERANCE /* xp */
|| broken(abs(count-64) < TIMER_COUNT_TOLERANCE) /* most common */
|| broken(abs(count-43) < TIMER_COUNT_TOLERANCE) /* w2k3, win8 */,
@@ -8589,6 +8590,7 @@ static void test_timers_no_wnd(void)
|| broken(abs(count-64) <= TIMER_COUNT_TOLERANCE) /* most common */
|| broken(abs(count-43) <= TIMER_COUNT_TOLERANCE) /* w2k3, win8 */,
@@ -10352,6 +10353,7 @@ static void test_timers_no_wnd(void)
start = GetTickCount();
while (GetTickCount()-start < 1001 && GetMessageA(&msg, NULL, 0, 0))
DispatchMessageA(&msg);
+todo_wine
ok(abs(count-TIMER_COUNT_EXPECTED) < TIMER_COUNT_TOLERANCE /* xp */
|| broken(abs(count-64) < TIMER_COUNT_TOLERANCE) /* most common */,
"did not get expected count for minimum timeout (%d != ~%d).\n",
|| broken(abs(count-64) <= TIMER_COUNT_TOLERANCE) /* most common */
|| broken(abs(count-43) <= TIMER_COUNT_TOLERANCE) /* w1064v1809 */,
--
2.5.1
2.17.1

View File

@@ -1,4 +1,4 @@
From ee1533db82fa2a955765b6a00f5300900350d2fe Mon Sep 17 00:00:00 2001
From 9e585de1f2f28e1ef18c1edca875779c491375cb Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 2 Oct 2014 19:44:31 +0200
Subject: [PATCH] kernel32: Add winediag message to show warning, that this
@@ -9,7 +9,7 @@ Subject: [PATCH] kernel32: Add winediag message to show warning, that this
1 file changed, 10 insertions(+)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 0a3fd70..206224f 100644
index 36ed82bff8c..b8a677c5485 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -65,6 +65,7 @@
@@ -18,9 +18,9 @@ index 0a3fd70..206224f 100644
WINE_DECLARE_DEBUG_CHANNEL(relay);
+WINE_DECLARE_DEBUG_CHANNEL(winediag);
#ifdef __APPLE__
extern char **__wine_get_main_environment(void);
@@ -1090,6 +1091,15 @@ void WINAPI start_process( LPTHREAD_START_ROUTINE entry, PEB *peb )
typedef struct
{
@@ -997,6 +998,15 @@ void WINAPI start_process( LPTHREAD_START_ROUTINE entry, PEB *peb )
__TRY
{
@@ -37,5 +37,5 @@ index 0a3fd70..206224f 100644
being_debugged = FALSE;
--
1.9.1
2.23.0

View File

@@ -1,7 +1,7 @@
From 83517396c266c2de290670128d678770f5d79cc9 Mon Sep 17 00:00:00 2001
From 486ec8b5ea1b39195d92cfdbfe3a334280780a14 Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Tue, 28 Apr 2015 23:00:08 +0800
Subject: advapi32: Fix name and use of DOMAIN_GROUP_RID_USERS.
Subject: [PATCH] advapi32: Fix name and use of DOMAIN_GROUP_RID_USERS.
---
dlls/advapi32/security.c | 7 +++++--
@@ -9,10 +9,10 @@ Subject: advapi32: Fix name and use of DOMAIN_GROUP_RID_USERS.
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
index d27b2e7..2362dd5 100644
index a7707f15d39..73c1f054d5c 100644
--- a/dlls/advapi32/security.c
+++ b/dlls/advapi32/security.c
@@ -191,7 +191,7 @@ static const WCHAR Domain_Admins[] = { 'D','o','m','a','i','n',' ','A','d','m','
@@ -187,7 +187,7 @@ static const WCHAR Domain_Admins[] = { 'D','o','m','a','i','n',' ','A','d','m','
static const WCHAR Domain_Computers[] = { 'D','o','m','a','i','n',' ','C','o','m','p','u','t','e','r','s',0 };
static const WCHAR Domain_Controllers[] = { 'D','o','m','a','i','n',' ','C','o','n','t','r','o','l','l','e','r','s',0 };
static const WCHAR Domain_Guests[] = { 'D','o','m','a','i','n',' ','G','u','e','s','t','s',0 };
@@ -21,7 +21,7 @@ index d27b2e7..2362dd5 100644
static const WCHAR Enterprise_Admins[] = { 'E','n','t','e','r','p','r','i','s','e',' ','A','d','m','i','n','s',0 };
static const WCHAR ENTERPRISE_DOMAIN_CONTROLLERS[] = { 'E','N','T','E','R','P','R','I','S','E',' ','D','O','M','A','I','N',' ','C','O','N','T','R','O','L','L','E','R','S',0 };
static const WCHAR Everyone[] = { 'E','v','e','r','y','o','n','e',0 };
@@ -2206,7 +2206,10 @@ LookupAccountSidW(
@@ -1185,7 +1185,10 @@ LookupAccountSidW(
ac = Domain_Admins;
break;
case DOMAIN_GROUP_RID_USERS:
@@ -34,20 +34,23 @@ index d27b2e7..2362dd5 100644
case DOMAIN_GROUP_RID_GUESTS:
ac = Domain_Guests;
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 573119f..490ce26 100644
index 5f65ed385dd..a9d745cfe39 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -2578,8 +2578,8 @@ static void test_process_security(void)
@@ -3003,11 +3003,11 @@ static void test_process_security(void)
dom_size = sizeof(domain);
ret = LookupAccountSidA( NULL, UsersSid, account, &acc_size, domain, &dom_size, &use );
ok(ret, "LookupAccountSid failed with %d\n", ret);
- todo_wine ok(use == SidTypeGroup, "expect SidTypeGroup, got %d\n", use);
- todo_wine ok(!strcmp(account, "None"), "expect None, got %s\n", account);
+ ok(use == SidTypeGroup, "expect SidTypeGroup, got %d\n", use);
+ ok(!strcmp(account, "None"), "expect None, got %s\n", account);
if (PRIMARYLANGID(GetSystemDefaultLangID()) != LANG_ENGLISH)
skip("Non-English locale (test with hardcoded 'None')\n");
else
- todo_wine ok(!strcmp(account, "None"), "expect None, got %s\n", account);
+ ok(!strcmp(account, "None"), "expect None, got %s\n", account);
res = GetTokenInformation( token, TokenUser, NULL, 0, &size );
ok(!res, "Expected failure, got %d\n", res);
--
2.3.5
2.17.1

View File

@@ -1,4 +1,4 @@
From f94296129eb249a04ccb012a10f50b79fb0a631a Mon Sep 17 00:00:00 2001
From 8959c13f2be7e2a31f27c8483ee2202692f00710 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 5 Aug 2017 01:45:29 +0200
Subject: [PATCH] ntdll: Add function to create new tokens for elevation
@@ -7,17 +7,17 @@ Subject: [PATCH] ntdll: Add function to create new tokens for elevation
---
dlls/ntdll/ntdll.spec | 3 ++
dlls/ntdll/ntdll_misc.h | 3 ++
dlls/ntdll/process.c | 18 +++++++++++
server/protocol.def | 8 +++++
dlls/ntdll/process.c | 18 +++++++++
server/protocol.def | 8 ++++
server/security.h | 1 +
server/token.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++++
server/token.c | 84 +++++++++++++++++++++++++++++++++++++++++
6 files changed, 117 insertions(+)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 969cee7..008abb7 100644
index d626e0bf2..5057e2b07 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1508,6 +1508,9 @@
@@ -1556,6 +1556,9 @@
# Virtual memory
@ cdecl __wine_locked_recvmsg(long ptr long)
@@ -28,12 +28,12 @@ index 969cee7..008abb7 100644
@ cdecl wine_get_version() NTDLL_wine_get_version
@ cdecl wine_get_patches() NTDLL_wine_get_patches
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 5a93ede..cb02bd1 100644
index ac1469412..6c2345c6c 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -83,6 +83,9 @@ extern void heap_set_debug_flags( HANDLE handle ) DECLSPEC_HIDDEN;
extern void init_user_process_params( SIZE_T data_size ) DECLSPEC_HIDDEN;
extern void update_user_process_params( const UNICODE_STRING *image ) DECLSPEC_HIDDEN;
@@ -89,6 +89,9 @@ extern void init_user_process_params( SIZE_T data_size ) DECLSPEC_HIDDEN;
extern char **build_envp( const WCHAR *envW ) DECLSPEC_HIDDEN;
extern NTSTATUS restart_process( RTL_USER_PROCESS_PARAMETERS *params, NTSTATUS status ) DECLSPEC_HIDDEN;
+/* token */
+extern HANDLE CDECL __wine_create_default_token(BOOL admin);
@@ -42,10 +42,10 @@ index 5a93ede..cb02bd1 100644
extern timeout_t server_start_time DECLSPEC_HIDDEN;
extern unsigned int server_cpus DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 2ff8610..bb4a171 100644
index 52d7ea429..e24691b8a 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -118,6 +118,24 @@ HANDLE CDECL __wine_make_process_system(void)
@@ -125,6 +125,24 @@ HANDLE CDECL __wine_make_process_system(void)
return ret;
}
@@ -71,10 +71,10 @@ index 2ff8610..bb4a171 100644
#define UNIMPLEMENTED_INFO_CLASS(c) \
diff --git a/server/protocol.def b/server/protocol.def
index 493100b..071f740 100644
index e908f2131..0177cb579 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3666,6 +3666,14 @@ struct handle_info
@@ -3734,6 +3734,14 @@ struct handle_info
@END
@@ -90,7 +90,7 @@ index 493100b..071f740 100644
@REQ(create_completion)
unsigned int access; /* desired access to a port */
diff --git a/server/security.h b/server/security.h
index 6c33714..21e90cc 100644
index 6c337143c..21e90ccf2 100644
--- a/server/security.h
+++ b/server/security.h
@@ -49,6 +49,7 @@ extern const PSID security_builtin_users_sid;
@@ -102,7 +102,7 @@ index 6c33714..21e90cc 100644
/* token functions */
diff --git a/server/token.c b/server/token.c
index 4c37c67..e449e61 100644
index 381ae6871..fcab79955 100644
--- a/server/token.c
+++ b/server/token.c
@@ -79,6 +79,7 @@ static const SID anonymous_logon_sid = { SID_REVISION, 1, { SECURITY_NT_AUTHORIT
@@ -121,7 +121,7 @@ index 4c37c67..e449e61 100644
static luid_t prev_luid_value = { 1000, 0 };
@@ -908,6 +910,64 @@ struct token *token_create_admin( void )
@@ -917,6 +919,64 @@ struct token *token_create_admin( void )
return token;
}
@@ -186,7 +186,7 @@ index 4c37c67..e449e61 100644
static struct privilege *token_find_privilege( struct token *token, const LUID *luid, int enabled_only )
{
struct privilege *privilege;
@@ -1713,3 +1773,27 @@ DECL_HANDLER(set_token_default_dacl)
@@ -1722,3 +1782,27 @@ DECL_HANDLER(set_token_default_dacl)
release_object( token );
}
}
@@ -215,5 +215,5 @@ index 4c37c67..e449e61 100644
+ }
+}
--
1.9.1
2.23.0

View File

@@ -1,24 +1,25 @@
From 19cfff2a16953b65f9767fee571a4ce5d51b0536 Mon Sep 17 00:00:00 2001
From 36762a2034391d67fc73ac037f8a7913cee911e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 5 Aug 2017 03:39:55 +0200
Subject: [PATCH] ntdll: Implement process token elevation through manifests.
---
dlls/ntdll/loader.c | 40 ++++++++++++++++++++++++++++++++++++++--
dlls/ntdll/loader.c | 39 ++++++++++++++++++++++++++++++++++++++-
server/process.c | 8 ++++++++
server/process.h | 1 +
server/protocol.def | 7 +++++++
server/token.c | 14 ++++++++++++++
5 files changed, 68 insertions(+), 2 deletions(-)
5 files changed, 68 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index c0708c6..479608f 100644
index 031bf83b4..c2810d50b 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -3505,6 +3505,32 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
@@ -3804,6 +3804,32 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
}
/***********************************************************************
+/***********************************************************************
+ * elevate_process
+ */
+static void elevate_process( void )
@@ -44,11 +45,10 @@ index c0708c6..479608f 100644
+}
+
+
+/***********************************************************************
/***********************************************************************
* load_global_options
*/
static void load_global_options(void)
@@ -3557,6 +3583,7 @@ static void load_global_options(void)
@@ -3866,6 +3892,7 @@ static void load_global_options(void)
}
@@ -56,7 +56,7 @@ index c0708c6..479608f 100644
/***********************************************************************
* RtlImageDirectoryEntryToData (NTDLL.@)
*/
@@ -3592,7 +3619,6 @@ PVOID WINAPI RtlImageDirectoryEntryToData( HMODULE module, BOOL image, WORD dir,
@@ -3901,7 +3928,6 @@ PVOID WINAPI RtlImageDirectoryEntryToData( HMODULE module, BOOL image, WORD dir,
return RtlImageRvaToVa( nt, module, addr, NULL );
}
@@ -64,18 +64,17 @@ index c0708c6..479608f 100644
/***********************************************************************
* RtlImageRvaToSection (NTDLL.@)
*/
@@ -3691,7 +3717,7 @@ void __wine_process_init(void)
@@ -4233,6 +4259,7 @@ void __wine_process_init(void)
's','y','s','t','e','m','3','2','\\',
'k','e','r','n','e','l','3','2','.','d','l','l',0};
static const WCHAR globalflagW[] = {'G','l','o','b','a','l','F','l','a','g',0};
-
RTL_USER_PROCESS_PARAMETERS *params;
+ ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION runlevel;
WINE_MODREF *wm;
NTSTATUS status;
ANSI_STRING func_name;
@@ -3742,6 +3768,16 @@ void __wine_process_init(void)
&NtCurrentTeb()->Peb->NtGlobalFlag, sizeof(DWORD), NULL );
heap_set_debug_flags( GetProcessHeap() );
@@ -4305,6 +4332,16 @@ void __wine_process_init(void)
virtual_set_large_address_space();
+ /* elevate process if necessary */
+ status = RtlQueryInformationActivationContext( 0, NULL, 0, RunlevelInformationInActivationContext,
@@ -89,12 +88,12 @@ index c0708c6..479608f 100644
+
/* the main exe needs to be the first in the load order list */
RemoveEntryList( &wm->ldr.InLoadOrderModuleList );
InsertHeadList( &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderModuleList );
InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderModuleList );
diff --git a/server/process.c b/server/process.c
index d8fdfcc..2c9365a 100644
index b4b239d2f..3cfc6f88f 100644
--- a/server/process.c
+++ b/server/process.c
@@ -1129,6 +1129,14 @@ struct process_snapshot *process_snap( int *count )
@@ -1107,6 +1107,14 @@ struct process_snapshot *process_snap( int *count )
return snapshot;
}
@@ -110,10 +109,10 @@ index d8fdfcc..2c9365a 100644
DECL_HANDLER(new_process)
{
diff --git a/server/process.h b/server/process.h
index d9d29f0..a494eab 100644
index 20ff6beda..e072a35ba 100644
--- a/server/process.h
+++ b/server/process.h
@@ -139,6 +139,7 @@ extern void break_process( struct process *process );
@@ -139,6 +139,7 @@ extern void kill_debugged_processes( struct thread *debugger, int exit_code );
extern void detach_debugged_processes( struct thread *debugger );
extern struct process_snapshot *process_snap( int *count );
extern void enum_processes( int (*cb)(struct process*, void*), void *user);
@@ -122,10 +121,10 @@ index d9d29f0..a494eab 100644
/* console functions */
extern void inherit_console(struct thread *parent_thread, struct process *process, obj_handle_t hconin);
diff --git a/server/protocol.def b/server/protocol.def
index 2b8d51a..650c279 100644
index 72fab786a..042072f58 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3721,6 +3721,13 @@ struct handle_info
@@ -3743,6 +3743,13 @@ struct handle_info
@END
@@ -140,7 +139,7 @@ index 2b8d51a..650c279 100644
@REQ(create_completion)
unsigned int access; /* desired access to a port */
diff --git a/server/token.c b/server/token.c
index fcab799..181219d 100644
index fcab79955..181219d21 100644
--- a/server/token.c
+++ b/server/token.c
@@ -1806,3 +1806,17 @@ DECL_HANDLER(create_token)
@@ -162,5 +161,5 @@ index fcab799..181219d 100644
+ }
+}
--
1.9.1
2.23.0

View File

@@ -1,130 +1,145 @@
From 9f35230848f29e79b65c8e340221d7eb81382a43 Mon Sep 17 00:00:00 2001
From b052f3aa98d77d3ab68cdb2622b8e77478abeb6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 6 Aug 2017 02:08:05 +0200
Subject: [PATCH] server: Implement support for creating processes using a
token.
---
dlls/kernel32/process.c | 27 +++++++++++++++------------
server/process.c | 39 +++++++++++++++++++++++++++++++++++----
server/process.h | 2 +-
server/protocol.def | 1 +
server/request.c | 2 +-
server/security.h | 2 ++
server/token.c | 11 +++++++++++
7 files changed, 66 insertions(+), 18 deletions(-)
dlls/kernelbase/process.c | 24 +++++++++++++-----------
dlls/ntdll/process.c | 3 ++-
server/process.c | 39 +++++++++++++++++++++++++++++++++++----
server/process.h | 2 +-
server/protocol.def | 1 +
server/request.c | 2 +-
server/security.h | 2 ++
server/token.c | 11 +++++++++++
8 files changed, 66 insertions(+), 18 deletions(-)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 802d99f2a12..03c0588d59a 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -2341,7 +2341,7 @@ static BOOL replace_process( HANDLE handle, const RTL_USER_PROCESS_PARAMETERS *p
* Create a new process. If hFile is a valid handle we have an exe
* file, otherwise it is a Winelib app.
diff --git a/dlls/kernelbase/process.c b/dlls/kernelbase/process.c
index 51b75470c..16396cb73 100644
--- a/dlls/kernelbase/process.c
+++ b/dlls/kernelbase/process.c
@@ -235,7 +235,7 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( const WCHAR *filename
/***********************************************************************
* create_nt_process
*/
-static BOOL create_process( HANDLE hFile, LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
+static BOOL create_process( HANDLE token, HANDLE hFile, LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
BOOL inherit, DWORD flags, const RTL_USER_PROCESS_PARAMETERS *params,
LPPROCESS_INFORMATION info, LPCSTR unixdir, const pe_image_info_t *pe_info )
-static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES *tsa,
+static NTSTATUS create_nt_process( HANDLE token, SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES *tsa,
BOOL inherit, DWORD flags, RTL_USER_PROCESS_PARAMETERS *params,
RTL_USER_PROCESS_INFORMATION *info )
{
@@ -2408,6 +2408,7 @@ static BOOL create_process( HANDLE hFile, LPSECURITY_ATTRIBUTES psa, LPSECURITY_
@@ -250,7 +250,7 @@ static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES
status = RtlCreateUserProcess( &nameW, OBJ_CASE_INSENSITIVE, params,
psa ? psa->lpSecurityDescriptor : NULL,
tsa ? tsa->lpSecurityDescriptor : NULL,
- 0, inherit, 0, 0, info );
+ 0, inherit, 0, token, info );
RtlFreeUnicodeString( &nameW );
}
return status;
@@ -260,7 +260,7 @@ static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES
/***********************************************************************
* create_vdm_process
*/
-static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES *tsa,
+static NTSTATUS create_vdm_process( HANDLE token, SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES *tsa,
BOOL inherit, DWORD flags, RTL_USER_PROCESS_PARAMETERS *params,
RTL_USER_PROCESS_INFORMATION *info )
{
@@ -281,7 +281,7 @@ static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
winevdm, params->ImagePathName.Buffer, params->CommandLine.Buffer );
RtlInitUnicodeString( &params->ImagePathName, winevdm );
RtlInitUnicodeString( &params->CommandLine, newcmdline );
- status = create_nt_process( psa, tsa, inherit, flags, params, info );
+ status = create_nt_process( token, psa, tsa, inherit, flags, params, info );
HeapFree( GetProcessHeap(), 0, newcmdline );
return status;
}
@@ -290,7 +290,7 @@ static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
/***********************************************************************
* create_cmd_process
*/
-static NTSTATUS create_cmd_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES *tsa,
+static NTSTATUS create_cmd_process( HANDLE token, SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES *tsa,
BOOL inherit, DWORD flags, RTL_USER_PROCESS_PARAMETERS *params,
RTL_USER_PROCESS_INFORMATION *info )
{
@@ -309,7 +309,7 @@ static NTSTATUS create_cmd_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
swprintf( newcmdline, len, L"%s /s/c \"%s\"", comspec, params->CommandLine.Buffer );
RtlInitUnicodeString( &params->ImagePathName, comspec );
RtlInitUnicodeString( &params->CommandLine, newcmdline );
- status = create_nt_process( psa, tsa, inherit, flags, params, info );
+ status = create_nt_process( token, psa, tsa, inherit, flags, params, info );
RtlFreeHeap( GetProcessHeap(), 0, newcmdline );
return status;
}
@@ -422,7 +422,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
TRACE( "app %s cmdline %s\n", debugstr_w(app_name), debugstr_w(cmd_line) );
- if (token) FIXME( "Creating a process with a token is not yet implemented\n" );
+ /* FIXME: Starting a process which requires admin rights should fail
+ * with ERROR_ELEVATION_REQUIRED when no token is passed. */
+
if (new_token) FIXME( "No support for returning created process token\n" );
if (app_name)
@@ -466,7 +468,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
goto done;
}
- status = create_nt_process( process_attr, thread_attr, inherit, flags, params, &rtl_info );
+ status = create_nt_process( token, process_attr, thread_attr, inherit, flags, params, &rtl_info );
switch (status)
{
case STATUS_SUCCESS:
@@ -475,7 +477,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
case STATUS_INVALID_IMAGE_NE_FORMAT:
case STATUS_INVALID_IMAGE_PROTECT:
TRACE( "starting %s as Win16/DOS binary\n", debugstr_w(app_name) );
- status = create_vdm_process( process_attr, thread_attr, inherit, flags, params, &rtl_info );
+ status = create_vdm_process( token, process_attr, thread_attr, inherit, flags, params, &rtl_info );
break;
case STATUS_INVALID_IMAGE_NOT_MZ:
/* check for .com or .bat extension */
@@ -483,12 +485,12 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
if (!wcsicmp( p, L".com" ) || !wcsicmp( p, L".pif" ))
{
TRACE( "starting %s as DOS binary\n", debugstr_w(app_name) );
- status = create_vdm_process( process_attr, thread_attr, inherit, flags, params, &rtl_info );
+ status = create_vdm_process( token, process_attr, thread_attr, inherit, flags, params, &rtl_info );
}
else if (!wcsicmp( p, L".bat" ) || !wcsicmp( p, L".cmd" ))
{
TRACE( "starting %s as batch binary\n", debugstr_w(app_name) );
- status = create_cmd_process( process_attr, thread_attr, inherit, flags, params, &rtl_info );
+ status = create_cmd_process( token, process_attr, thread_attr, inherit, flags, params, &rtl_info );
}
break;
}
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index e24691b8a..89403167b 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -1667,7 +1667,7 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
RTL_USER_PROCESS_PARAMETERS *params,
SECURITY_DESCRIPTOR *process_descr,
SECURITY_DESCRIPTOR *thread_descr,
- HANDLE parent, BOOLEAN inherit, HANDLE debug, HANDLE exception,
+ HANDLE parent, BOOLEAN inherit, HANDLE debug, HANDLE token,
RTL_USER_PROCESS_INFORMATION *info )
{
NTSTATUS status;
@@ -1734,6 +1734,7 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
req->access = PROCESS_ALL_ACCESS;
req->cpu = pe_info->cpu;
req->cpu = pe_info.cpu;
req->info_size = startup_info_size;
+ req->token = wine_server_obj_handle( token );
wine_server_add_data( req, objattr, attr_len );
wine_server_add_data( req, startup_info, startup_info_size );
wine_server_add_data( req, params->Environment, (env_end - params->Environment) * sizeof(WCHAR) );
@@ -2567,7 +2568,7 @@ static RTL_USER_PROCESS_PARAMETERS *get_vdm_params( const RTL_USER_PROCESS_PARAM
*
* Create a new VDM process for a 16-bit or DOS application.
*/
-static BOOL create_vdm_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
+static BOOL create_vdm_process( HANDLE token, LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
BOOL inherit, DWORD flags, const RTL_USER_PROCESS_PARAMETERS *params,
LPPROCESS_INFORMATION info, LPCSTR unixdir )
{
@@ -2577,7 +2578,7 @@ static BOOL create_vdm_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES
if (!(new_params = get_vdm_params( params, &pe_info ))) return FALSE;
- ret = create_process( 0, psa, tsa, inherit, flags, new_params, info, unixdir, &pe_info );
+ ret = create_process( token, 0, psa, tsa, inherit, flags, new_params, info, unixdir, &pe_info );
RtlDestroyProcessParameters( new_params );
return ret;
}
@@ -2588,7 +2589,7 @@ static BOOL create_vdm_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES
*
* Create a new cmd shell process for a .BAT file.
*/
-static BOOL create_cmd_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
+static BOOL create_cmd_process( HANDLE token, LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
BOOL inherit, DWORD flags, LPSTARTUPINFOW startup,
const RTL_USER_PROCESS_PARAMETERS *params,
LPPROCESS_INFORMATION info )
@@ -2618,9 +2619,9 @@ static BOOL create_cmd_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES
strcatW( newcmdline, params->CommandLine.Buffer );
strcatW( newcmdline, quotW );
if (params->CurrentDirectory.DosPath.Length) cur_dir = params->CurrentDirectory.DosPath.Buffer;
- ret = CreateProcessW( comspec, newcmdline, psa, tsa, inherit,
+ ret = CreateProcessInternalW( token, comspec, newcmdline, psa, tsa, inherit,
flags | CREATE_UNICODE_ENVIRONMENT, params->Environment, cur_dir,
- startup, info );
+ startup, info, NULL );
HeapFree( GetProcessHeap(), 0, newcmdline );
return ret;
}
@@ -2734,7 +2735,9 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
TRACE("app %s cmdline %s\n", debugstr_w(app_name), debugstr_w(cmd_line) );
- if (token) FIXME("Creating a process with a token is not yet implemented\n");
+ /* FIXME: Starting a process which requires admin rights should fail
+ * with ERROR_ELEVATION_REQUIRED when no token is passed. */
+
if (new_token) FIXME("No support for returning created process token\n");
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, ARRAY_SIZE( name ), &hFile, &is_64bit )))
@@ -2802,17 +2805,17 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
debugstr_w(name), is_64bit_arch(pe_info.cpu) ? 64 : 32,
wine_dbgstr_longlong(pe_info.base), wine_dbgstr_longlong(pe_info.base + pe_info.map_size),
cpu_names[pe_info.cpu] );
- retv = create_process( hFile, process_attr, thread_attr,
+ retv = create_process( token, hFile, process_attr, thread_attr,
inherit, flags, params, info, unixdir, &pe_info );
break;
case BINARY_WIN16:
TRACE( "starting %s as Win16/DOS binary\n", debugstr_w(name) );
- retv = create_vdm_process( process_attr, thread_attr, inherit, flags, params, info, unixdir );
+ retv = create_vdm_process( token, process_attr, thread_attr, inherit, flags, params, info, unixdir );
break;
case BINARY_UNIX_LIB:
TRACE( "starting %s as %d-bit Winelib app\n",
debugstr_w(name), is_64bit_arch(pe_info.cpu) ? 64 : 32 );
- retv = create_process( hFile, process_attr, thread_attr,
+ retv = create_process( token, hFile, process_attr, thread_attr,
inherit, flags, params, info, unixdir, &pe_info );
break;
case BINARY_UNKNOWN:
@@ -2822,14 +2825,14 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
if (!strcmpiW( p, comW ) || !strcmpiW( p, pifW ))
{
TRACE( "starting %s as DOS binary\n", debugstr_w(name) );
- retv = create_vdm_process( process_attr, thread_attr,
+ retv = create_vdm_process( token, process_attr, thread_attr,
inherit, flags, params, info, unixdir );
break;
}
if (!strcmpiW( p, batW ) || !strcmpiW( p, cmdW ) )
{
TRACE( "starting %s as batch binary\n", debugstr_w(name) );
- retv = create_cmd_process( process_attr, thread_attr,
+ retv = create_cmd_process( token, process_attr, thread_attr,
inherit, flags, startup_info, params, info );
break;
}
wine_server_add_data( req, params->Environment, env_size );
diff --git a/server/process.c b/server/process.c
index 30832f474da..028ffa1b454 100644
index 3cfc6f88f..b4466cf43 100644
--- a/server/process.c
+++ b/server/process.c
@@ -491,7 +491,7 @@ static void start_sigkill_timer( struct process *process )
@@ -136,7 +151,7 @@ index 30832f474da..028ffa1b454 100644
{
struct process *process;
@@ -567,7 +567,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
@@ -568,7 +568,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
: alloc_handle_table( process, 0 );
/* Note: for security reasons, starting a new process does not attempt
* to use the current impersonation token for the new process */
@@ -145,7 +160,7 @@ index 30832f474da..028ffa1b454 100644
process->affinity = parent->affinity;
}
if (!process->handles || !process->token) goto error;
@@ -1123,6 +1123,7 @@ DECL_HANDLER(new_process)
@@ -1124,6 +1124,7 @@ DECL_HANDLER(new_process)
const struct security_descriptor *sd;
const struct object_attributes *objattr = get_req_object_attributes( &sd, &name, NULL );
struct process *process = NULL;
@@ -153,7 +168,7 @@ index 30832f474da..028ffa1b454 100644
struct process *parent = current->process;
int socket_fd = thread_get_inflight_fd( current, req->socket_fd );
@@ -1163,10 +1164,39 @@ DECL_HANDLER(new_process)
@@ -1164,10 +1165,39 @@ DECL_HANDLER(new_process)
return;
}
@@ -193,7 +208,7 @@ index 30832f474da..028ffa1b454 100644
return;
}
info->process = NULL;
@@ -1213,7 +1243,7 @@ DECL_HANDLER(new_process)
@@ -1214,7 +1244,7 @@ DECL_HANDLER(new_process)
#undef FIXUP_LEN
}
@@ -202,7 +217,7 @@ index 30832f474da..028ffa1b454 100644
process->startup_info = (struct startup_info *)grab_object( info );
@@ -1275,6 +1305,7 @@ DECL_HANDLER(new_process)
@@ -1276,6 +1306,7 @@ DECL_HANDLER(new_process)
reply->handle = alloc_handle_no_access_check( parent, process, req->access, objattr->attributes );
done:
@@ -210,7 +225,7 @@ index 30832f474da..028ffa1b454 100644
if (process) release_object( process );
release_object( info );
}
@@ -1307,7 +1338,7 @@ DECL_HANDLER(exec_process)
@@ -1308,7 +1339,7 @@ DECL_HANDLER(exec_process)
close( socket_fd );
return;
}
@@ -220,10 +235,10 @@ index 30832f474da..028ffa1b454 100644
release_object( process );
}
diff --git a/server/process.h b/server/process.h
index f21ab7722a9..774c147e783 100644
index e072a35ba..9cf757cec 100644
--- a/server/process.h
+++ b/server/process.h
@@ -117,7 +117,7 @@ extern unsigned int alloc_ptid( void *ptr );
@@ -118,7 +118,7 @@ extern unsigned int alloc_ptid( void *ptr );
extern void free_ptid( unsigned int id );
extern void *get_ptid_entry( unsigned int id );
extern struct process *create_process( int fd, struct process *parent, int inherit_all,
@@ -233,7 +248,7 @@ index f21ab7722a9..774c147e783 100644
extern struct thread *get_process_first_thread( struct process *process );
extern struct process *get_process_from_id( process_id_t id );
diff --git a/server/protocol.def b/server/protocol.def
index fcca1d255ba..4b01c6d1904 100644
index 81a90f7d4..aa68ceedb 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -790,6 +790,7 @@ struct rawinput_device
@@ -245,7 +260,7 @@ index fcca1d255ba..4b01c6d1904 100644
VARARG(info,startup_info,info_size); /* startup information */
VARARG(env,unicode_str); /* environment for new process */
diff --git a/server/request.c b/server/request.c
index d2adb08a183..139d643e8c8 100644
index d2adb08a1..139d643e8 100644
--- a/server/request.c
+++ b/server/request.c
@@ -578,7 +578,7 @@ static void master_socket_poll_event( struct fd *fd, int event )
@@ -258,7 +273,7 @@ index d2adb08a183..139d643e8c8 100644
create_thread( -1, process, NULL );
release_object( process );
diff --git a/server/security.h b/server/security.h
index 21e90ccf23f..32dfe5f8db9 100644
index 21e90ccf2..32dfe5f8d 100644
--- a/server/security.h
+++ b/server/security.h
@@ -67,6 +67,8 @@ extern const ACL *token_get_default_dacl( struct token *token );
@@ -271,7 +286,7 @@ index 21e90ccf23f..32dfe5f8db9 100644
static inline const ACE_HEADER *ace_next( const ACE_HEADER *ace )
{
diff --git a/server/token.c b/server/token.c
index 181219d2179..858ec25d792 100644
index 181219d21..858ec25d7 100644
--- a/server/token.c
+++ b/server/token.c
@@ -845,6 +845,12 @@ int token_assign_label( struct token *token, PSID label )
@@ -300,5 +315,5 @@ index 181219d2179..858ec25d792 100644
{
GENERIC_MAPPING mapping;
--
2.20.1
2.23.0

View File

@@ -1,68 +0,0 @@
From e72b9a5931139e2d4c651e62f9b5ac226af2bedd Mon Sep 17 00:00:00 2001
From: Louis Lenders <xerox.xerox2000x@gmail.com>
Date: Mon, 8 Apr 2019 08:26:43 +0200
Subject: [PATCH 1/2] include: Add restrictederrorinfo.idl.
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
---
include/Makefile.in | 1 +
include/restrictederrorinfo.idl | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
create mode 100644 include/restrictederrorinfo.idl
diff --git a/include/Makefile.in b/include/Makefile.in
index b03b967..5bc8dde 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -545,6 +545,7 @@ SOURCES = \
reason.h \
regstr.h \
restartmanager.h \
+ restrictederrorinfo.idl \
richedit.h \
richole.idl \
rmxfguid.h \
diff --git a/include/restrictederrorinfo.idl b/include/restrictederrorinfo.idl
new file mode 100644
index 0000000..e444256
--- /dev/null
+++ b/include/restrictederrorinfo.idl
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2019 Louis Lenders
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+import "oaidl.idl";
+
+[
+ object,
+ uuid(82ba7092-4c88-427d-a7bc-16dd93feb67e),
+ pointer_default(unique)
+]
+interface IRestrictedErrorInfo : IUnknown
+{
+ HRESULT GetErrorDetails (
+ [out] BSTR *desc,
+ [out] HRESULT *error,
+ [out] BSTR *restricted_desc,
+ [out] BSTR *sid);
+
+ HRESULT GetReference ([out] BSTR *reference);
+}
--
1.9.1

View File

@@ -1,128 +0,0 @@
From 50ba23f4d3f7e40bf02cb8f3cdcc4d729f6d68d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 27 Feb 2017 20:42:27 +0100
Subject: crypt32: Add MS root CA 2010.
---
dlls/crypt32/rootstore.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 98 insertions(+)
diff --git a/dlls/crypt32/rootstore.c b/dlls/crypt32/rootstore.c
index 73d954f7404..d6c0dfbc819 100644
--- a/dlls/crypt32/rootstore.c
+++ b/dlls/crypt32/rootstore.c
@@ -666,6 +666,103 @@ static const BYTE rootcertauthority[] = {
0x7e,0x6c,0x9e,0xdb,0x73,0x13,0x64,0x62,0x69,0xa5,0x2f,0x7d,0xca,0x96,0x6d,0x9f,
0xf8,0x04,0x4d,0x30,0x92,0x3d,0x6e,0x21,0x14,0x21,0xc9,0x3d,0xe0,0xc3,0xfd,0x8a,
0x6b,0x9d,0x4a,0xfd,0xd1,0xa1,0x9d,0x99,0x43,0x77,0x3f,0xb0,0xda };
+static const BYTE rootcertauthority2010[] = {
+0x30,0x82,0x05,0xed,0x30,0x82,0x03,0xd5,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,0x28,
+0xcc,0x3a,0x25,0xbf,0xba,0x44,0xac,0x44,0x9a,0x9b,0x58,0x6b,0x43,0x39,0xaa,0x30,
+0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x0b,0x05,0x00,0x30,0x81,
+0x88,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x13,
+0x30,0x11,0x06,0x03,0x55,0x04,0x08,0x13,0x0a,0x57,0x61,0x73,0x68,0x69,0x6e,0x67,
+0x74,0x6f,0x6e,0x31,0x10,0x30,0x0e,0x06,0x03,0x55,0x04,0x07,0x13,0x07,0x52,0x65,
+0x64,0x6d,0x6f,0x6e,0x64,0x31,0x1e,0x30,0x1c,0x06,0x03,0x55,0x04,0x0a,0x13,0x15,
+0x4d,0x69,0x63,0x72,0x6f,0x73,0x6f,0x66,0x74,0x20,0x43,0x6f,0x72,0x70,0x6f,0x72,
+0x61,0x74,0x69,0x6f,0x6e,0x31,0x32,0x30,0x30,0x06,0x03,0x55,0x04,0x03,0x13,0x29,
+0x4d,0x69,0x63,0x72,0x6f,0x73,0x6f,0x66,0x74,0x20,0x52,0x6f,0x6f,0x74,0x20,0x43,
+0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x65,0x20,0x41,0x75,0x74,0x68,0x6f,
+0x72,0x69,0x74,0x79,0x20,0x32,0x30,0x31,0x30,0x30,0x1e,0x17,0x0d,0x31,0x30,0x30,
+0x36,0x32,0x33,0x32,0x31,0x35,0x37,0x32,0x34,0x5a,0x17,0x0d,0x33,0x35,0x30,0x36,
+0x32,0x33,0x32,0x32,0x30,0x34,0x30,0x31,0x5a,0x30,0x81,0x88,0x31,0x0b,0x30,0x09,
+0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x13,0x30,0x11,0x06,0x03,0x55,
+0x04,0x08,0x13,0x0a,0x57,0x61,0x73,0x68,0x69,0x6e,0x67,0x74,0x6f,0x6e,0x31,0x10,
+0x30,0x0e,0x06,0x03,0x55,0x04,0x07,0x13,0x07,0x52,0x65,0x64,0x6d,0x6f,0x6e,0x64,
+0x31,0x1e,0x30,0x1c,0x06,0x03,0x55,0x04,0x0a,0x13,0x15,0x4d,0x69,0x63,0x72,0x6f,
+0x73,0x6f,0x66,0x74,0x20,0x43,0x6f,0x72,0x70,0x6f,0x72,0x61,0x74,0x69,0x6f,0x6e,
+0x31,0x32,0x30,0x30,0x06,0x03,0x55,0x04,0x03,0x13,0x29,0x4d,0x69,0x63,0x72,0x6f,
+0x73,0x6f,0x66,0x74,0x20,0x52,0x6f,0x6f,0x74,0x20,0x43,0x65,0x72,0x74,0x69,0x66,
+0x69,0x63,0x61,0x74,0x65,0x20,0x41,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,
+0x32,0x30,0x31,0x30,0x30,0x82,0x02,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,
+0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x02,0x0f,0x00,0x30,0x82,0x02,0x0a,
+0x02,0x82,0x02,0x01,0x00,0xb9,0x08,0x9e,0x28,0xe4,0xe4,0xec,0x06,0x4e,0x50,0x68,
+0xb3,0x41,0xc5,0x7b,0xeb,0xae,0xb6,0x8e,0xaf,0x81,0xba,0x22,0x44,0x1f,0x65,0x34,
+0x69,0x4c,0xbe,0x70,0x40,0x17,0xf2,0x16,0x7b,0xe2,0x79,0xfd,0x86,0xed,0x0d,0x39,
+0xf4,0x1b,0xa8,0xad,0x92,0x90,0x1e,0xcb,0x3d,0x76,0x8f,0x5a,0xd9,0xb5,0x91,0x10,
+0x2e,0x3c,0x05,0x8d,0x8a,0x6d,0x24,0x54,0xe7,0x1f,0xed,0x56,0xad,0x83,0xb4,0x50,
+0x9c,0x15,0xa5,0x17,0x74,0x88,0x59,0x20,0xfc,0x08,0xc5,0x84,0x76,0xd3,0x68,0xd4,
+0x6f,0x28,0x78,0xce,0x5c,0xb8,0xf3,0x50,0x90,0x44,0xff,0xe3,0x63,0x5f,0xbe,0xa1,
+0x9a,0x2c,0x96,0x15,0x04,0xd6,0x07,0xfe,0x1e,0x84,0x21,0xe0,0x42,0x31,0x11,0xc4,
+0x28,0x36,0x94,0xcf,0x50,0xa4,0x62,0x9e,0xc9,0xd6,0xab,0x71,0x00,0xb2,0x5b,0x0c,
+0xe6,0x96,0xd4,0x0a,0x24,0x96,0xf5,0xff,0xc6,0xd5,0xb7,0x1b,0xd7,0xcb,0xb7,0x21,
+0x62,0xaf,0x12,0xdc,0xa1,0x5d,0x37,0xe3,0x1a,0xfb,0x1a,0x46,0x98,0xc0,0x9b,0xc0,
+0xe7,0x63,0x1f,0x2a,0x08,0x93,0x02,0x7e,0x1e,0x6a,0x8e,0xf2,0x9f,0x18,0x89,0xe4,
+0x22,0x85,0xa2,0xb1,0x84,0x57,0x40,0xff,0xf5,0x0e,0xd8,0x6f,0x9c,0xed,0xe2,0x45,
+0x31,0x01,0xcd,0x17,0xe9,0x7f,0xb0,0x81,0x45,0xe3,0xaa,0x21,0x40,0x26,0xa1,0x72,
+0xaa,0xa7,0x4f,0x3c,0x01,0x05,0x7e,0xee,0x83,0x58,0xb1,0x5e,0x06,0x63,0x99,0x62,
+0x91,0x78,0x82,0xb7,0x0d,0x93,0x0c,0x24,0x6a,0xb4,0x1b,0xdb,0x27,0xec,0x5f,0x95,
+0x04,0x3f,0x93,0x4a,0x30,0xf5,0x97,0x18,0xb3,0xa7,0xf9,0x19,0xa7,0x93,0x33,0x1d,
+0x01,0xc8,0xdb,0x22,0x52,0x5c,0xd7,0x25,0xc9,0x46,0xf9,0xa2,0xfb,0x87,0x59,0x43,
+0xbe,0x9b,0x62,0xb1,0x8d,0x2d,0x86,0x44,0x1a,0x46,0xac,0x78,0x61,0x7e,0x30,0x09,
+0xfa,0xae,0x89,0xc4,0x41,0x2a,0x22,0x66,0x03,0x91,0x39,0x45,0x9c,0xc7,0x8b,0x0c,
+0xa8,0xca,0x0d,0x2f,0xfb,0x52,0xea,0x0c,0xf7,0x63,0x33,0x23,0x9d,0xfe,0xb0,0x1f,
+0xad,0x67,0xd6,0xa7,0x50,0x03,0xc6,0x04,0x70,0x63,0xb5,0x2c,0xb1,0x86,0x5a,0x43,
+0xb7,0xfb,0xae,0xf9,0x6e,0x29,0x6e,0x21,0x21,0x41,0x26,0x06,0x8c,0xc9,0xc3,0xee,
+0xb0,0xc2,0x85,0x93,0xa1,0xb9,0x85,0xd9,0xe6,0x32,0x6c,0x4b,0x4c,0x3f,0xd6,0x5d,
+0xa3,0xe5,0xb5,0x9d,0x77,0xc3,0x9c,0xc0,0x55,0xb7,0x74,0x00,0xe3,0xb8,0x38,0xab,
+0x83,0x97,0x50,0xe1,0x9a,0x42,0x24,0x1d,0xc6,0xc0,0xa3,0x30,0xd1,0x1a,0x5a,0xc8,
+0x52,0x34,0xf7,0x73,0xf1,0xc7,0x18,0x1f,0x33,0xad,0x7a,0xec,0xcb,0x41,0x60,0xf3,
+0x23,0x94,0x20,0xc2,0x48,0x45,0xac,0x5c,0x51,0xc6,0x2e,0x80,0xc2,0xe2,0x77,0x15,
+0xbd,0x85,0x87,0xed,0x36,0x9d,0x96,0x91,0xee,0x00,0xb5,0xa3,0x70,0xec,0x9f,0xe3,
+0x8d,0x80,0x68,0x83,0x76,0xba,0xaf,0x5d,0x70,0x52,0x22,0x16,0xe2,0x66,0xfb,0xba,
+0xb3,0xc5,0xc2,0xf7,0x3e,0x2f,0x77,0xa6,0xca,0xde,0xc1,0xa6,0xc6,0x48,0x4c,0xc3,
+0x37,0x51,0x23,0xd3,0x27,0xd7,0xb8,0x4e,0x70,0x96,0xf0,0xa1,0x44,0x76,0xaf,0x78,
+0xcf,0x9a,0xe1,0x66,0x13,0x02,0x03,0x01,0x00,0x01,0xa3,0x51,0x30,0x4f,0x30,0x0b,
+0x06,0x03,0x55,0x1d,0x0f,0x04,0x04,0x03,0x02,0x01,0x86,0x30,0x0f,0x06,0x03,0x55,
+0x1d,0x13,0x01,0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x1d,0x06,0x03,
+0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0xd5,0xf6,0x56,0xcb,0x8f,0xe8,0xa2,0x5c,0x62,
+0x68,0xd1,0x3d,0x94,0x90,0x5b,0xd7,0xce,0x9a,0x18,0xc4,0x30,0x10,0x06,0x09,0x2b,
+0x06,0x01,0x04,0x01,0x82,0x37,0x15,0x01,0x04,0x03,0x02,0x01,0x00,0x30,0x0d,0x06,
+0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x0b,0x05,0x00,0x03,0x82,0x02,0x01,
+0x00,0xac,0xa5,0x96,0x8c,0xbf,0xbb,0xae,0xa6,0xf6,0xd7,0x71,0x87,0x43,0x31,0x56,
+0x88,0xfd,0x1c,0x32,0x71,0x5b,0x35,0xb7,0xd4,0xf0,0x91,0xf2,0xaf,0x37,0xe2,0x14,
+0xf1,0xf3,0x02,0x26,0x05,0x3e,0x16,0x14,0x7f,0x14,0xba,0xb8,0x4f,0xfb,0x89,0xb2,
+0xb2,0xe7,0xd4,0x09,0xcc,0x6d,0xb9,0x5b,0x3b,0x64,0x65,0x70,0x66,0xb7,0xf2,0xb1,
+0x5a,0xdf,0x1a,0x02,0xf3,0xf5,0x51,0xb8,0x67,0x6d,0x79,0xf3,0xbf,0x56,0x7b,0xe4,
+0x84,0xb9,0x2b,0x1e,0x9b,0x40,0x9c,0x26,0x34,0xf9,0x47,0x18,0x98,0x69,0xd8,0x1c,
+0xd7,0xb6,0xd1,0xbf,0x8f,0x61,0xc2,0x67,0xc4,0xb5,0xef,0x60,0x43,0x8e,0x10,0x1b,
+0x36,0x49,0xe4,0x20,0xca,0xad,0xa7,0xc1,0xb1,0x27,0x65,0x09,0xf8,0xcd,0xf5,0x5b,
+0x2a,0xd0,0x84,0x33,0xf3,0xef,0x1f,0xf2,0xf5,0x9c,0x0b,0x58,0x93,0x37,0xa0,0x75,
+0xa0,0xde,0x72,0xde,0x6c,0x75,0x2a,0x66,0x22,0xf5,0x8c,0x06,0x30,0x56,0x9f,0x40,
+0xb9,0x30,0xaa,0x40,0x77,0x15,0x82,0xd7,0x8b,0xec,0xc0,0xd3,0xb2,0xbd,0x83,0xc5,
+0x77,0x0c,0x1e,0xae,0xaf,0x19,0x53,0xa0,0x4d,0x79,0x71,0x9f,0x0f,0xaf,0x30,0xce,
+0x67,0xf9,0xd6,0x2c,0xcc,0x22,0x41,0x7a,0x07,0xf2,0x97,0x42,0x18,0xce,0x59,0x79,
+0x10,0x55,0xde,0x6f,0x10,0xe4,0xb8,0xda,0x83,0x66,0x40,0x16,0x09,0x68,0x23,0x5b,
+0x97,0x2e,0x26,0x9a,0x02,0xbb,0x57,0x8c,0xc5,0xb8,0xba,0x69,0x62,0x32,0x80,0x89,
+0x9e,0xa1,0xfd,0xc0,0x92,0x7c,0x7b,0x2b,0x33,0x19,0x84,0x2a,0x63,0xc5,0x00,0x68,
+0x62,0xfa,0x9f,0x47,0x8d,0x99,0x7a,0x45,0x3a,0xa7,0xe9,0xed,0xee,0x69,0x42,0xb5,
+0xf3,0x81,0x9b,0x47,0x56,0x10,0x7b,0xfc,0x70,0x36,0x84,0x18,0x73,0xea,0xef,0xf9,
+0x97,0x4d,0x9e,0x33,0x23,0xdd,0x26,0x0b,0xba,0x2a,0xb7,0x3f,0x44,0xdc,0x83,0x27,
+0xff,0xbd,0x61,0x59,0x2b,0x11,0xb7,0xca,0x4f,0xdb,0xc5,0x8b,0x0c,0x1c,0x31,0xae,
+0x32,0xf8,0xf8,0xb9,0x42,0xf7,0x7f,0xdc,0x61,0x9a,0x76,0xb1,0x5a,0x04,0xe1,0x11,
+0x3d,0x66,0x45,0xb7,0x18,0x71,0xbe,0xc9,0x24,0x85,0xd6,0xf3,0xd4,0xba,0x41,0x34,
+0x5d,0x12,0x2d,0x25,0xb9,0x8d,0xa6,0x13,0x48,0x6d,0x4b,0xb0,0x07,0x7d,0x99,0x93,
+0x09,0x61,0x81,0x74,0x57,0x26,0x8a,0xab,0x69,0xe3,0xe4,0xd9,0xc7,0x88,0xcc,0x24,
+0xd8,0xec,0x52,0x24,0x5c,0x1e,0xbc,0x91,0x14,0xe2,0x96,0xde,0xeb,0x0a,0xda,0x9e,
+0xdd,0x5f,0xb3,0x5b,0xdb,0xd4,0x82,0xec,0xc6,0x20,0x50,0x87,0x25,0x40,0x3a,0xfb,
+0xc7,0xee,0xcd,0xfe,0x33,0xe5,0x6e,0xc3,0x84,0x09,0x55,0x03,0x25,0x39,0xc0,0xe9,
+0x35,0x5d,0x65,0x31,0xa8,0xf6,0xbf,0xa0,0x09,0xcd,0x29,0xc7,0xb3,0x36,0x32,0x2e,
+0xdc,0x95,0xf3,0x83,0xc1,0x5a,0xcf,0x8b,0x8d,0xf6,0xea,0xb3,0x21,0xf8,0xa4,0xed,
+0x1e,0x31,0x0e,0xb6,0x4c,0x11,0xab,0x60,0x0b,0xa4,0x12,0x23,0x22,0x17,0xa3,0x36,
+0x64,0x82,0x91,0x04,0x12,0xe0,0xab,0x6f,0x1e,0xcb,0x50,0x05,0x61,0xb4,0x40,0xff,
+0x59,0x86,0x71,0xd1,0xd5,0x33,0x69,0x7c,0xa9,0x73,0x8a,0x38,0xd7,0x64,0x0c,0xf1,
+0x69 };
static const BYTE rootcertauthority2011[] = {
0x30,0x82,0x05,0xed,0x30,0x82,0x03,0xd5,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,0x3f,
0x8b,0xc8,0xb5,0xfc,0x9f,0xb2,0x96,0x43,0xb5,0x69,0xd6,0x6c,0x42,0xe1,0x44,0x30,
@@ -771,6 +868,7 @@ static const struct CONST_BLOB {
{ authenticode, sizeof(authenticode) },
{ rootauthority, sizeof(rootauthority) },
{ rootcertauthority, sizeof(rootcertauthority) },
+ { rootcertauthority2010, sizeof(rootcertauthority2010) },
{ rootcertauthority2011, sizeof(rootcertauthority2011) },
};
--
2.14.1

View File

@@ -1 +0,0 @@
Fixes: Add MS root certificates 2010/2011

View File

@@ -1,15 +1,15 @@
From 50dfa70735f6a0f8cf9e77c70143a91555627a5a Mon Sep 17 00:00:00 2001
From 896b9be78dfd979ddea8f098ae66473956d4147c Mon Sep 17 00:00:00 2001
From: Kimmo Myllyvirta <kimmo.myllyvirta@gmail.com>
Date: Sat, 24 Sep 2016 06:51:24 +0300
Subject: [PATCH] d3d11: Add stub deferred rendering context.
---
dlls/d3d11/device.c | 1267 +++++++++++++++++++++++++++++++++-----
dlls/d3d11/device.c | 1268 +++++++++++++++++++++++++++++++++-----
dlls/d3d11/tests/d3d11.c | 4 +-
2 files changed, 1132 insertions(+), 139 deletions(-)
2 files changed, 1132 insertions(+), 140 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 08579164bd..dca5a88caa 100644
index 31c7f35fc25..dca5a88caa0 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -22,6 +22,16 @@
@@ -1352,13 +1352,14 @@ index 08579164bd..dca5a88caa 100644
iface, byte_code, byte_code_length, class_linkage, shader);
if (class_linkage)
@@ -3362,9 +4340,22 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateCounter(ID3D11Device2 *iface
@@ -3362,10 +4340,22 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateCounter(ID3D11Device2 *iface
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device2 *iface, UINT flags,
ID3D11DeviceContext **context)
{
- FIXME("iface %p, flags %#x, context %p stub!\n", iface, flags, context);
+ struct d3d11_deferred_context *object;
- *context = NULL;
- return E_NOTIMPL;
+ TRACE("iface %p, flags %#x, context %p.\n", iface, flags, context);
+
@@ -1378,7 +1379,7 @@ index 08579164bd..dca5a88caa 100644
static HRESULT STDMETHODCALLTYPE d3d11_device_OpenSharedResource(ID3D11Device2 *iface, HANDLE resource, REFIID iid,
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index d58319df58..e653fb30b2 100644
index da4627d7a85..dadeac27662 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -2231,6 +2231,8 @@ static void test_create_deferred_context(void)
@@ -1400,5 +1401,5 @@ index d58319df58..e653fb30b2 100644
goto done;
refcount = get_refcount(device);
--
2.21.0
2.23.0

View File

@@ -1,15 +1,15 @@
From 31a800096eb212cda55f6fbea955f05c650ea2c1 Mon Sep 17 00:00:00 2001
From c01cbb5811cb9de58a0c3fa7822382f45900b435 Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Fri, 27 Sep 2019 16:26:04 +0300
Subject: [PATCH] d3d11/tests: Add a basic test for drawing with deferred
context.
---
dlls/d3d11/tests/d3d11.c | 101 +++++++++++++++++++++++++++++++--------
1 file changed, 81 insertions(+), 20 deletions(-)
dlls/d3d11/tests/d3d11.c | 100 +++++++++++++++++++++++++++++++--------
1 file changed, 81 insertions(+), 19 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index e653fb30b2..202179174b 100644
index 7f11a59d0cb..c63bae8bbab 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -1692,10 +1692,11 @@ static void release_test_context_(unsigned int line, struct d3d11_test_context *
@@ -158,7 +158,7 @@ index e653fb30b2..202179174b 100644
static void test_device_interfaces(const D3D_FEATURE_LEVEL feature_level)
{
struct device_desc device_desc;
@@ -29400,11 +29462,11 @@ START_TEST(d3d11)
@@ -29639,11 +29701,11 @@ START_TEST(d3d11)
}
print_adapter_info();
@@ -171,13 +171,6 @@ index e653fb30b2..202179174b 100644
queue_test(test_create_texture1d);
queue_test(test_texture1d_interfaces);
queue_test(test_create_texture2d);
@@ -29538,6 +29600,5 @@ START_TEST(d3d11)
queue_test(test_render_a8);
queue_test(test_standard_pattern);
queue_test(test_desktop_window);
-
run_queued_tests();
}
--
2.21.0
2.17.1

View File

@@ -0,0 +1,95 @@
From 9838666108baca0c57a9dc5538d0d9af98eae18e Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Tue, 12 Nov 2019 21:13:22 -0600
Subject: [PATCH] d3d9: Return a stub interface from
Direct3DShaderValidatorCreate9().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46735
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/d3d9/d3d9_main.c | 61 ++++++++++++++++++++++++++++++++++++++++---
1 file changed, 57 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d9/d3d9_main.c b/dlls/d3d9/d3d9_main.c
index 21df2a34cd2..3bec0eaa169 100644
--- a/dlls/d3d9/d3d9_main.c
+++ b/dlls/d3d9/d3d9_main.c
@@ -75,18 +75,71 @@ HRESULT WINAPI DECLSPEC_HOTPATCH Direct3DCreate9Ex(UINT sdk_version, IDirect3D9E
return D3D_OK;
}
+static HRESULT WINAPI shader_validator_QueryInterface(void *iface, REFIID iid, void **out)
+{
+ TRACE("iface %p, iid %p, out %p.\n", iface, iid, out);
+
+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
+ *out = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI shader_validator_AddRef(void *iface)
+{
+ TRACE("iface %p.\n", iface);
+ return 2;
+}
+
+static ULONG WINAPI shader_validator_Release(void *iface)
+{
+ TRACE("iface %p.\n", iface);
+ return 1;
+}
+
+static HRESULT WINAPI shader_validator_stub1(void *arg1, void *arg2, void *arg3, void *arg4)
+{
+ FIXME("arg1 %p, arg2 %p, arg3 %p, arg4 %p, stub!\n", arg1, arg2, arg3, arg4);
+ return S_OK;
+}
+
+static HRESULT WINAPI shader_validator_stub2(void *arg1, void *arg2, void *arg3, DWORD *arg4, DWORD_PTR arg5)
+{
+ int i;
+ FIXME("arg1 %p, arg2 %p, arg3 %p, arg4 %p, arg5 %#lx, stub!\n", arg1, arg2, arg3, arg4, arg5);
+ for (i = 0; i < arg5; ++i)
+ FIXME(" %#x\n", arg4[i]);
+ return S_OK;
+}
+
+static HRESULT WINAPI shader_validator_stub3(void *arg1)
+{
+ FIXME("arg1 %p, stub!\n", arg1);
+ return S_OK;
+}
+
+static const void *shader_validator_vtbl[] =
+{
+ shader_validator_QueryInterface,
+ shader_validator_AddRef,
+ shader_validator_Release,
+ shader_validator_stub1,
+ shader_validator_stub2,
+ shader_validator_stub3,
+};
+
+static void *shader_validator = &shader_validator_vtbl;
+
/*******************************************************************
* Direct3DShaderValidatorCreate9 (D3D9.@)
*
* No documentation available for this function.
* SDK only says it is internal and shouldn't be used.
*/
-void* WINAPI Direct3DShaderValidatorCreate9(void)
+void * WINAPI Direct3DShaderValidatorCreate9(void)
{
- static int once;
+ TRACE("Returning validator %p.\n", &shader_validator);
- if (!once++) FIXME("stub\n");
- return NULL;
+ return &shader_validator;
}
/***********************************************************************
--
2.23.0

View File

@@ -0,0 +1 @@
Fixes: [46735] The Sims 2 demo needs Direct3DShaderValidatorCreate9() implementation

View File

@@ -1,53 +0,0 @@
From 5d633f126af17add8eaefc10c08e400616ff5fc9 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Tue, 4 Nov 2014 22:22:03 +0100
Subject: [PATCH] d3dx9_36: Align texture dimensions to block size for
compressed textures in D3DXCheckTextureRequirements.
---
dlls/d3dx9_36/tests/texture.c | 9 +++++++++
dlls/d3dx9_36/texture.c | 8 ++++----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/dlls/d3dx9_36/tests/texture.c b/dlls/d3dx9_36/tests/texture.c
index fc1589d25e..93a7fcd911 100644
--- a/dlls/d3dx9_36/tests/texture.c
+++ b/dlls/d3dx9_36/tests/texture.c
@@ -448,6 +448,15 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
ok(width == 4, "Got unexpected width %d.\n", width);
ok(height == 4, "Got unexpected height %d.\n", height);
ok(format == D3DFMT_DXT5, "Got unexpected format %u.\n", format);
+
+ width = 5; height = 5;
+ mipmaps = 1;
+ hr = D3DXCheckTextureRequirements(device, &width, &height, &mipmaps, 0, &format, D3DPOOL_DEFAULT);
+ ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK);
+ ok(width == 8, "Returned width %d, expected %d\n", width, 8);
+ ok(height == 8, "Returned height %d, expected %d\n", height, 8);
+ ok(mipmaps == 1, "Returned mipmaps %d, expected %d\n", mipmaps, 1);
+ ok(format == D3DFMT_DXT5, "Returned format %u, expected %u\n", format, D3DFMT_DXT5);
}
else
{
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
index 4ae924999e..a592b7ba1e 100644
--- a/dlls/d3dx9_36/texture.c
+++ b/dlls/d3dx9_36/texture.c
@@ -339,10 +339,10 @@ HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UIN
if (fmt->block_width != 1 || fmt->block_height != 1)
{
- if (w < fmt->block_width)
- w = fmt->block_width;
- if (h < fmt->block_height)
- h = fmt->block_height;
+ if (w % fmt->block_width)
+ w += fmt->block_width - w % fmt->block_width;
+ if (h % fmt->block_height)
+ h += fmt->block_height - h % fmt->block_height;
}
if ((caps.TextureCaps & D3DPTEXTURECAPS_POW2) && (!is_pow2(w)))
--
2.21.0

View File

@@ -1,10 +1,9 @@
From 1a21bd1a5584a1d2b54a8a6df9944d44a83b05d1 Mon Sep 17 00:00:00 2001
From 2dbc476ab7a1edb75f07108a6a44ea2700513797 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 29 Jul 2015 17:09:50 +0200
Subject: [PATCH] ddraw: Create rendering targets in video memory if possible.
Based on a patch by Henri Verbeet.
---
dlls/ddraw/ddraw.c | 6 +++---
dlls/ddraw/ddraw_private.h | 3 ++-
@@ -13,10 +12,10 @@ Based on a patch by Henri Verbeet.
4 files changed, 56 insertions(+), 15 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index 68e9286590..1141739e78 100644
index e77aab1cc5c..7df9cf5b28f 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -4296,7 +4296,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
@@ -4297,7 +4297,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
TRACE("iface %p, riid %s, surface %p, device %p.\n", iface, debugstr_guid(riid), surface, device);
wined3d_mutex_lock();
@@ -25,7 +24,7 @@ index 68e9286590..1141739e78 100644
{
*device = &object->IDirect3DDevice7_iface;
}
@@ -4325,7 +4325,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
@@ -4326,7 +4326,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
return CLASS_E_NOAGGREGATION;
wined3d_mutex_lock();
@@ -34,7 +33,7 @@ index 68e9286590..1141739e78 100644
{
*device = &device_impl->IDirect3DDevice3_iface;
}
@@ -4351,7 +4351,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
@@ -4352,7 +4352,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
iface, debugstr_guid(riid), surface, device);
wined3d_mutex_lock();
@@ -44,10 +43,10 @@ index 68e9286590..1141739e78 100644
*device = &device_impl->IDirect3DDevice2_iface;
}
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
index 771b2a44d1..4bf0e46462 100644
index 4ecd83d006b..c11f4f0aa80 100644
--- a/dlls/ddraw/ddraw_private.h
+++ b/dlls/ddraw/ddraw_private.h
@@ -307,6 +307,7 @@ struct d3d_device
@@ -309,6 +309,7 @@ struct d3d_device
IUnknown IUnknown_inner;
LONG ref;
UINT version;
@@ -55,8 +54,8 @@ index 771b2a44d1..4bf0e46462 100644
IUnknown *outer_unknown;
struct wined3d_device *wined3d_device;
@@ -354,7 +355,7 @@ struct d3d_device
struct wined3d_stateblock *recording;
@@ -356,7 +357,7 @@ struct d3d_device
struct wined3d_stateblock *recording, *state, *update_state;
};
-HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUnknown *rt_iface,
@@ -65,7 +64,7 @@ index 771b2a44d1..4bf0e46462 100644
enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device *device) DECLSPEC_HIDDEN;
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 43e5d0aa92..5d18a129f7 100644
index 3702454bde0..cc43cdc8840 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -1854,7 +1854,7 @@ static HRESULT d3d_device7_SetRenderTarget(IDirect3DDevice7 *iface,
@@ -95,7 +94,7 @@ index 43e5d0aa92..5d18a129f7 100644
{
WARN("Surface %p is not in video memory.\n", target_impl);
IDirectDrawSurface_AddRef(target);
@@ -6933,7 +6933,7 @@ enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device
@@ -6947,7 +6947,7 @@ enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device
return WINED3D_ZB_TRUE;
}
@@ -104,7 +103,7 @@ index 43e5d0aa92..5d18a129f7 100644
struct ddraw_surface *target, IUnknown *rt_iface, UINT version, IUnknown *outer_unknown)
{
static const D3DMATRIX ident =
@@ -6956,6 +6956,7 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
@@ -6970,6 +6970,7 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
device->IUnknown_inner.lpVtbl = &d3d_device_inner_vtbl;
device->ref = 1;
device->version = version;
@@ -112,7 +111,7 @@ index 43e5d0aa92..5d18a129f7 100644
if (outer_unknown)
device->outer_unknown = outer_unknown;
@@ -7009,14 +7010,18 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
@@ -7026,14 +7027,18 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
return D3D_OK;
}
@@ -134,7 +133,7 @@ index 43e5d0aa92..5d18a129f7 100644
if (!(target->surface_desc.ddsCaps.dwCaps & DDSCAPS_3DDEVICE)
|| (target->surface_desc.ddsCaps.dwCaps & DDSCAPS_ZBUFFER))
@@ -7039,7 +7044,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
@@ -7056,7 +7061,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
return DDERR_OUTOFMEMORY;
}
@@ -143,7 +142,7 @@ index 43e5d0aa92..5d18a129f7 100644
{
WARN("Surface %p is not in video memory.\n", target);
return D3DERR_SURFACENOTINVIDMEM;
@@ -7057,7 +7062,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
@@ -7074,7 +7079,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
return DDERR_OUTOFMEMORY;
}
@@ -153,7 +152,7 @@ index 43e5d0aa92..5d18a129f7 100644
WARN("Failed to initialize device, hr %#x.\n", hr);
heap_free(object);
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 66e5a9e616..31ccce29b8 100644
index 0c03120662b..3e0d6d66573 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -223,7 +223,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
@@ -165,7 +164,7 @@ index 66e5a9e616..31ccce29b8 100644
1, &This->device1, (IUnknown *)&This->IDirectDrawSurface_iface)))
{
This->device1 = NULL;
@@ -6197,7 +6197,42 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
@@ -6198,7 +6198,42 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
if (desc->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY)
{
@@ -210,5 +209,5 @@ index 66e5a9e616..31ccce29b8 100644
}
else
--
2.21.0
2.17.1

View File

@@ -1,4 +1,4 @@
From bf5df83b1be55676dcd539b79d0f2ceabb9409a5 Mon Sep 17 00:00:00 2001
From 882c25ffe94d7e8869ed5a364120cf0c5f2ef241 Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Thu, 4 Apr 2019 02:25:00 +0300
Subject: [PATCH] ddraw: Allow setting texture without DDSCAPS_TEXTURE for
@@ -11,10 +11,10 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
2 files changed, 141 insertions(+), 9 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 1d176970c6..9b6c9af570 100644
index e2643e6589..a43bca7a14 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -2910,10 +2910,8 @@ static HRESULT WINAPI d3d_device3_SetLightState(IDirect3DDevice3 *iface,
@@ -2921,10 +2921,8 @@ static HRESULT WINAPI d3d_device3_SetLightState(IDirect3DDevice3 *iface,
wined3d_mutex_unlock();
return DDERR_INVALIDPARAMS;
}
@@ -25,7 +25,7 @@ index 1d176970c6..9b6c9af570 100644
device->material = value;
}
else if (state == D3DLIGHTSTATE_COLORMODEL)
@@ -4794,7 +4792,8 @@ static HRESULT d3d_device7_SetTexture(IDirect3DDevice7 *iface,
@@ -4807,7 +4805,8 @@ static HRESULT d3d_device7_SetTexture(IDirect3DDevice7 *iface,
struct ddraw_surface *surf = unsafe_impl_from_IDirectDrawSurface7(texture);
struct wined3d_texture *wined3d_texture = NULL;
@@ -35,7 +35,7 @@ index 1d176970c6..9b6c9af570 100644
if (surf && (surf->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE))
wined3d_texture = surf->wined3d_texture;
@@ -4830,19 +4829,30 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface,
@@ -4845,19 +4844,30 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface,
{
struct d3d_device *device = impl_from_IDirect3DDevice3(iface);
struct ddraw_surface *tex = unsafe_impl_from_IDirect3DTexture2(texture);
@@ -70,7 +70,7 @@ index 1d176970c6..9b6c9af570 100644
static const struct tss_lookup
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index bc58c1817c..3c643afe15 100644
index e3146ca45d..8861244e05 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -330,7 +330,7 @@ static IDirectDraw4 *create_ddraw(void)
@@ -132,7 +132,7 @@ index bc58c1817c..3c643afe15 100644
static IDirect3DViewport3 *create_viewport(IDirect3DDevice3 *device, UINT x, UINT y, UINT w, UINT h)
{
IDirect3DViewport3 *viewport;
@@ -16383,6 +16394,116 @@ static void test_d32_support(void)
@@ -16819,6 +16830,116 @@ static void test_surface_format_conversion_alpha(void)
DestroyWindow(window);
}
@@ -249,14 +249,14 @@ index bc58c1817c..3c643afe15 100644
START_TEST(ddraw4)
{
DDDEVICEIDENTIFIER identifier;
@@ -16515,6 +16636,7 @@ START_TEST(ddraw4)
@@ -16951,6 +17072,7 @@ START_TEST(ddraw4)
test_gdi_surface();
test_alphatest();
test_clipper_refcount();
+ test_texture_wrong_caps();
test_caps();
test_d32_support();
}
test_surface_format_conversion_alpha();
--
2.20.1
2.17.1

View File

@@ -1,16 +1,16 @@
From 3d90cc93c56571a6c1d7d25054094106595e7c03 Mon Sep 17 00:00:00 2001
From 290d6b2b773e9729c38495ec8c1291b40678bc31 Mon Sep 17 00:00:00 2001
From: Jetro Jormalainen <jje-wine@jv.jetro.fi>
Date: Tue, 30 Apr 2019 09:20:20 +1000
Subject: [PATCH] dinput: Load users Joystick mappings.
Subject: [PATCH 1/3] dinput: Load users Joystick mappings.
---
dlls/dinput/device.c | 2 +-
dlls/dinput/device_private.h | 2 ++
dlls/dinput/joystick.c | 18 ++++++++++++++++++
3 files changed, 21 insertions(+), 1 deletion(-)
dlls/dinput/joystick.c | 25 +++++++++++++++++++++++++
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index ade7947..648a4cc 100644
index 28329d03b5..d1bf934a82 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -714,7 +714,7 @@ static HRESULT save_mapping_settings(IDirectInputDevice8W *iface, LPDIACTIONFORM
@@ -23,10 +23,10 @@ index ade7947..648a4cc 100644
HKEY hkey;
WCHAR *guid_str;
diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h
index d9e2997..af8d99d 100644
index 27e9c26286..ea794d7396 100644
--- a/dlls/dinput/device_private.h
+++ b/dlls/dinput/device_private.h
@@ -123,6 +123,8 @@ extern const char *_dump_dinput_GUID(const GUID *guid) DECLSPEC_HIDDEN;
@@ -125,6 +125,8 @@ extern const char *_dump_dinput_GUID(const GUID *guid) DECLSPEC_HIDDEN;
extern LPDIOBJECTDATAFORMAT dataformat_to_odf_by_type(LPCDIDATAFORMAT df, int n, DWORD type) DECLSPEC_HIDDEN;
@@ -36,23 +36,26 @@ index d9e2997..af8d99d 100644
extern HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags, LPCDIDATAFORMAT df) DECLSPEC_HIDDEN;
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index 20d9ee4..62b57bc 100644
index 2220b5d576..8341e0313a 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -28,6 +28,7 @@
@@ -28,8 +28,10 @@
#include <stdio.h>
+#include "device_private.h"
#include "joystick_private.h"
#include "wine/debug.h"
+#include "wine/heap.h"
#include "winreg.h"
@@ -792,9 +793,26 @@ HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
WINE_DEFAULT_DEBUG_CHANNEL(dinput);
@@ -825,9 +827,32 @@ HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
JoystickGenericImpl *This = impl_from_IDirectInputDevice8W(iface);
unsigned int i, j;
BOOL has_actions = FALSE;
+ WCHAR username[MAX_PATH];
+ DWORD username_size = MAX_PATH;
+ WCHAR *username;
+ DWORD size;
+ BOOL load_success = FALSE;
FIXME("(%p)->(%p,%s,%08x): semi-stub !\n", This, lpdiaf, debugstr_w(lpszUserName), dwFlags);
@@ -60,13 +63,19 @@ index 20d9ee4..62b57bc 100644
+ /* Unless asked the contrary by these flags, try to load a previous mapping */
+ if (!(dwFlags & DIDBAM_HWDEFAULTS))
+ {
+ /* Retrieve logged user name if necessary */
+ if (lpszUserName == NULL)
+ GetUserNameW(username, &username_size);
+ if (!lpszUserName)
+ GetUserNameW(NULL, &size);
+ else
+ lstrcpynW(username, lpszUserName, MAX_PATH);
+ size = lstrlenW(lpszUserName) + 1;
+
+ username = heap_alloc(size * sizeof(WCHAR));
+ if (!lpszUserName)
+ GetUserNameW(username, &size);
+ else
+ lstrcpynW(username, lpszUserName, size);
+
+ load_success = load_mapping_settings((IDirectInputDeviceImpl *) This, lpdiaf, username);
+ heap_free(username);
+ }
+
+ if (load_success) return DI_OK;
@@ -75,5 +84,5 @@ index 20d9ee4..62b57bc 100644
{
DWORD inst = (0x000000ff & (lpdiaf->rgoAction[i].dwSemantic)) - 1;
--
1.9.1
2.17.1

View File

@@ -1,21 +1,29 @@
From 920014b62ddd2218477e3d82f45c4515742f9e28 Mon Sep 17 00:00:00 2001
From bce769d9179ffbcbc634e73ad124528e28c5c7a8 Mon Sep 17 00:00:00 2001
From: Jetro Jormalainen <jje-wine@jv.jetro.fi>
Date: Tue, 30 Apr 2019 09:20:54 +1000
Subject: [PATCH 2/3] dinput: Allow empty Joystick mappings.
Subject: [PATCH] dinput: Allow empty Joystick mappings.
---
dlls/dinput/device.c | 82 +++++++++++++++++++++++++++++++++++++--------
dlls/dinput/joystick.c | 2 ++
dlls/dinput/keyboard.c | 2 ++
dlls/dinput/mouse.c | 2 ++
dlls/dinput8/tests/device.c | 50 +++++++++++++++++++++++++++
5 files changed, 124 insertions(+), 14 deletions(-)
dlls/dinput/device.c | 82 ++++++++++++++++++++++++++++++-------
dlls/dinput/joystick.c | 4 +-
dlls/dinput/keyboard.c | 2 +
dlls/dinput/mouse.c | 2 +
dlls/dinput8/tests/device.c | 50 ++++++++++++++++++++++
5 files changed, 125 insertions(+), 15 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index 2150db7..a7cfe36 100644
index d1bf934a827..6107ab26538 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -643,12 +643,30 @@ static DWORD semantic_to_obj_id(IDirectInputDeviceImpl* This, DWORD dwSemantic)
@@ -30,6 +30,7 @@
#include <string.h>
#include "wine/debug.h"
#include "wine/unicode.h"
+#include "wine/heap.h"
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
@@ -643,12 +644,29 @@ static DWORD semantic_to_obj_id(IDirectInputDeviceImpl* This, DWORD dwSemantic)
return type | (0x0000ff00 & (obj_instance << 8));
}
@@ -27,14 +35,13 @@ index 2150db7..a7cfe36 100644
+ 'M','a','p','p','i','n','g','s','\\','%','s','\\','%','s','\\','%','s','\0'};
+ WCHAR *keyname;
+
+ keyname = HeapAlloc(GetProcessHeap(), 0,
+ sizeof(WCHAR) * (lstrlenW(subkey) + strlenW(username) + strlenW(device) + strlenW(guid)));
+ keyname = heap_alloc(sizeof(WCHAR) * (lstrlenW(subkey) + strlenW(username) + strlenW(device) + strlenW(guid)));
+ sprintfW(keyname, subkey, username, device, guid);
+
+ /* Remove old key mappings so there will be no overlapping mappings */
+ RegDeleteKeyW(HKEY_CURRENT_USER, keyname);
+
+ HeapFree(GetProcessHeap(), 0, keyname);
+ heap_free(keyname);
+}
+
/*
@@ -97,12 +104,12 @@ index 2150db7..a7cfe36 100644
- lpdiaf->rgoAction[i].dwHow = DIAH_DEFAULT;
- mapped += 1;
+ lpdiaf->rgoAction[i].dwHow = DIAH_USERCONFIG;
}
+ }
+ else
+ {
+ memset(&lpdiaf->rgoAction[i].guidInstance, 0, sizeof(GUID));
+ lpdiaf->rgoAction[i].dwHow = DIAH_UNMAPPED;
+ }
}
+
}
@@ -187,10 +194,19 @@ index 2150db7..a7cfe36 100644
This->num_actions = num_actions;
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index b146712..267f932 100644
index 66d6cfdffb9..73215dac0d5 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -907,6 +907,8 @@ HRESULT WINAPI JoystickAGenericImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
@@ -847,7 +847,7 @@ HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
else
lstrcpynW(username, lpszUserName, size);
- load_success = load_mapping_settings((IDirectInputDeviceImpl *) This, lpdiaf, username);
+ load_success = load_mapping_settings(&This->base, lpdiaf, username);
heap_free(username);
}
@@ -957,6 +957,8 @@ HRESULT WINAPI JoystickAGenericImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
hr = JoystickWGenericImpl_SetActionMap(&This->base.IDirectInputDevice8W_iface, &diafW, lpszUserNameW, dwFlags);
@@ -200,10 +216,10 @@ index b146712..267f932 100644
HeapFree(GetProcessHeap(), 0, lpszUserNameW);
diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c
index 42c0759..5c5aa14 100644
index b5e665933ec..0747f5d8c8b 100644
--- a/dlls/dinput/keyboard.c
+++ b/dlls/dinput/keyboard.c
@@ -693,6 +693,8 @@ static HRESULT WINAPI SysKeyboardAImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
@@ -690,6 +690,8 @@ static HRESULT WINAPI SysKeyboardAImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
hr = SysKeyboardWImpl_SetActionMap(&This->base.IDirectInputDevice8W_iface, &diafW, lpszUserNameW, dwFlags);
@@ -213,10 +229,10 @@ index 42c0759..5c5aa14 100644
HeapFree(GetProcessHeap(), 0, lpszUserNameW);
diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c
index f3ec8e4..0adba03 100644
index 52a766b2a1a..796f1fa2977 100644
--- a/dlls/dinput/mouse.c
+++ b/dlls/dinput/mouse.c
@@ -863,6 +863,8 @@ static HRESULT WINAPI SysMouseAImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
@@ -862,6 +862,8 @@ static HRESULT WINAPI SysMouseAImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
hr = SysMouseWImpl_SetActionMap(&This->base.IDirectInputDevice8W_iface, &diafW, lpszUserNameW, dwFlags);
@@ -226,7 +242,7 @@ index f3ec8e4..0adba03 100644
HeapFree(GetProcessHeap(), 0, lpszUserNameW);
diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c
index 1bfb34a..46a1e4a 100644
index f3e7b542355..bec2a6b863c 100644
--- a/dlls/dinput8/tests/device.c
+++ b/dlls/dinput8/tests/device.c
@@ -38,6 +38,8 @@ struct enum_data {
@@ -301,5 +317,5 @@ index 1bfb34a..46a1e4a 100644
IDirectInput_Release(pDI);
}
--
1.9.1
2.17.1

View File

@@ -1,20 +1,34 @@
From af785463a8e9fc8ff47ead4143151e9831cbbddf Mon Sep 17 00:00:00 2001
From ed590782f6149f56c0e4c6747cea5a297543047b Mon Sep 17 00:00:00 2001
From: Jetro Jormalainen <jje-wine@jv.jetro.fi>
Date: Tue, 30 Apr 2019 09:21:24 +1000
Subject: [PATCH] dinput: Support username in Config dialog.
---
dlls/dinput/config.c | 183 ++++++++++++++++++++++++++++++-------------
dlls/dinput/config.c | 187 ++++++++++++++++++++++++-----------
dlls/dinput/device.c | 2 +-
dlls/dinput/device_private.h | 1 +
dlls/dinput/dinput_main.c | 27 +++++++
4 files changed, 156 insertions(+), 57 deletions(-)
dlls/dinput/dinput_main.c | 28 ++++++
4 files changed, 161 insertions(+), 57 deletions(-)
diff --git a/dlls/dinput/config.c b/dlls/dinput/config.c
index bf44898..cd2c4b9 100644
index bf44898589..c7a33d2da0 100644
--- a/dlls/dinput/config.c
+++ b/dlls/dinput/config.c
@@ -29,6 +29,9 @@ typedef struct {
@@ -18,17 +18,23 @@
#define NONAMELESSUNION
+
#include "wine/unicode.h"
#include "objbase.h"
#include "dinput_private.h"
#include "device_private.h"
#include "resource.h"
+#include "wine/heap.h"
+
typedef struct {
int nobjects;
IDirectInputDevice8W *lpdid;
DIDEVICEINSTANCEW ddi;
DIDEVICEOBJECTINSTANCEW ddo[256];
@@ -24,7 +38,7 @@ index bf44898..cd2c4b9 100644
} DeviceData;
typedef struct {
@@ -38,10 +41,11 @@ typedef struct {
@@ -38,10 +44,11 @@ typedef struct {
typedef struct {
IDirectInput8W *lpDI;
@@ -37,7 +51,7 @@ index bf44898..cd2c4b9 100644
} ConfigureDevicesData;
/*
@@ -57,27 +61,42 @@ static BOOL CALLBACK collect_objects(LPCDIDEVICEOBJECTINSTANCEW lpddo, LPVOID pv
@@ -57,27 +64,42 @@ static BOOL CALLBACK collect_objects(LPCDIDEVICEOBJECTINSTANCEW lpddo, LPVOID pv
return DIENUM_CONTINUE;
}
@@ -71,15 +85,15 @@ index bf44898..cd2c4b9 100644
IDirectInputDevice_EnumObjects(lpdid, collect_objects, (LPVOID) device, DIDFT_ALL);
- data->ndevices++;
+ device->user_afs = HeapAlloc(GetProcessHeap(), 0, sizeof(*device->user_afs)*data->nusernames);
+ memset(device->user_afs, 0, sizeof(*device->user_afs)*data->nusernames);
+ device->user_afs = heap_alloc(sizeof(*device->user_afs) * data->nusernames);
+ memset(device->user_afs, 0, sizeof(*device->user_afs) * data->nusernames);
+ for (i = 0; i < data->nusernames; i++)
+ {
+ DIACTIONFORMATW *user_af = &device->user_afs[i];
+ user_af->dwNumActions = data->original_lpdiaf->dwNumActions;
+ user_af->guidActionMap = data->original_lpdiaf->guidActionMap;
+ user_af->rgoAction = HeapAlloc(GetProcessHeap(), 0, sizeof(DIACTIONW)*data->original_lpdiaf->dwNumActions);
+ memset(user_af->rgoAction, 0, sizeof(DIACTIONW)*data->original_lpdiaf->dwNumActions);
+ user_af->rgoAction = heap_alloc(sizeof(DIACTIONW) * data->original_lpdiaf->dwNumActions);
+ memset(user_af->rgoAction, 0, sizeof(DIACTIONW) * data->original_lpdiaf->dwNumActions);
+ for (j = 0; j < user_af->dwNumActions; j++)
+ {
+ user_af->rgoAction[j].dwSemantic = data->original_lpdiaf->rgoAction[j].dwSemantic;
@@ -92,7 +106,7 @@ index bf44898..cd2c4b9 100644
return DIENUM_CONTINUE;
}
@@ -170,10 +189,18 @@ static DeviceData* get_cur_device(HWND dialog)
@@ -170,10 +192,18 @@ static DeviceData* get_cur_device(HWND dialog)
return &data->devices_data.devices[sel];
}
@@ -113,7 +127,7 @@ index bf44898..cd2c4b9 100644
}
static int dialog_display_only(HWND dialog)
@@ -182,40 +209,36 @@ static int dialog_display_only(HWND dialog)
@@ -182,40 +212,36 @@ static int dialog_display_only(HWND dialog)
return data->display_only;
}
@@ -155,8 +169,8 @@ index bf44898..cd2c4b9 100644
+ {
IDirectInputDevice8_Release(devices_data->devices[i].lpdid);
+ for (j=0; j < data->nusernames; j++)
+ HeapFree(GetProcessHeap(), 0, devices_data->devices[i].user_afs[j].rgoAction);
+ HeapFree(GetProcessHeap(), 0, devices_data->devices[i].user_afs);
+ heap_free(devices_data->devices[i].user_afs[j].rgoAction);
+ heap_free(devices_data->devices[i].user_afs);
+ }
HeapFree(GetProcessHeap(), 0, devices_data->devices);
@@ -167,7 +181,7 @@ index bf44898..cd2c4b9 100644
}
static void fill_device_object_list(HWND dialog)
@@ -231,6 +254,7 @@ static void fill_device_object_list(HWND dialog)
@@ -231,6 +257,7 @@ static void fill_device_object_list(HWND dialog)
/* Add each object */
for (i=0; i < device->nobjects; i++)
{
@@ -175,7 +189,7 @@ index bf44898..cd2c4b9 100644
int action = -1;
item.mask = LVIF_TEXT | LVIF_PARAM;
@@ -241,12 +265,20 @@ static void fill_device_object_list(HWND dialog)
@@ -241,12 +268,20 @@ static void fill_device_object_list(HWND dialog)
/* Add the item */
SendDlgItemMessageW(dialog, IDC_DEVICEOBJECTSLIST, LVM_INSERTITEMW, 0, (LPARAM) &item);
@@ -198,7 +212,7 @@ index bf44898..cd2c4b9 100644
{
action = j;
break;
@@ -260,7 +292,7 @@ static void fill_device_object_list(HWND dialog)
@@ -260,7 +295,7 @@ static void fill_device_object_list(HWND dialog)
static void show_suitable_actions(HWND dialog)
{
DeviceData *device = get_cur_device(dialog);
@@ -207,7 +221,7 @@ index bf44898..cd2c4b9 100644
int i, added = 0;
int obj = lv_get_cur_item(dialog);
@@ -329,24 +361,35 @@ static void assign_action(HWND dialog)
@@ -329,24 +364,35 @@ static void assign_action(HWND dialog)
lv_set_action(dialog, obj, action, lpdiaf);
}
@@ -255,7 +269,7 @@ index bf44898..cd2c4b9 100644
}
static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM wParam, LPARAM lParam)
@@ -358,21 +401,16 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
@@ -358,21 +404,16 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
ConfigureDevicesData *data = (ConfigureDevicesData*) lParam;
/* Initialize action format and enumerate devices */
@@ -279,7 +293,7 @@ index bf44898..cd2c4b9 100644
fill_device_object_list(dialog);
ShowCursor(TRUE);
@@ -414,6 +452,7 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
@@ -414,6 +455,7 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
break;
case IDC_CONTROLLERCOMBO:
@@ -287,7 +301,7 @@ index bf44898..cd2c4b9 100644
switch (HIWORD(wParam))
{
@@ -424,12 +463,12 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
@@ -424,12 +466,12 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
break;
case IDOK:
@@ -301,13 +315,13 @@ index bf44898..cd2c4b9 100644
EndDialog(dialog, 0);
destroy_data(dialog);
break;
@@ -452,15 +491,47 @@ HRESULT _configure_devices(IDirectInput8W *iface,
@@ -452,15 +494,48 @@ HRESULT _configure_devices(IDirectInput8W *iface,
LPVOID pvRefData
)
{
+ int i;
+ DWORD default_username_size = MAX_PATH;
+ WCHAR *default_username = 0;
+ DWORD size;
+ WCHAR *username = NULL;
ConfigureDevicesData data;
data.lpDI = iface;
- data.lpdiaf = lpdiCDParams->lprgFormats;
@@ -317,16 +331,17 @@ index bf44898..cd2c4b9 100644
+ if (lpdiCDParams->lptszUserNames == NULL)
+ {
+ /* Get default user name */
+ default_username = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*MAX_PATH);
+ GetUserNameW(NULL, &size);
+ username = heap_alloc(size * sizeof(WCHAR) );
+ GetUserNameW(username, &size);
+ data.nusernames = 1;
+ data.usernames = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR *));
+ data.usernames[0] = default_username;
+ GetUserNameW(default_username, &default_username_size);
+ data.usernames = heap_alloc(sizeof(WCHAR *));
+ data.usernames[0] = username;
+ }
+ else
+ {
+ WCHAR *p = lpdiCDParams->lptszUserNames;
+ data.usernames = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR *)*data.nusernames);
+ data.usernames = heap_alloc(sizeof(WCHAR *) * data.nusernames);
+ for (i = 0; i < data.nusernames; i++)
+ {
+ if (*p)
@@ -345,13 +360,13 @@ index bf44898..cd2c4b9 100644
DialogBoxParamW(DINPUT_instance, (const WCHAR *)MAKEINTRESOURCE(IDD_CONFIGUREDEVICES),
lpdiCDParams->hwnd, ConfigureDevicesDlgProc, (LPARAM)&data);
+ HeapFree(GetProcessHeap(), 0, default_username);
+ HeapFree(GetProcessHeap(), 0, data.usernames);
+ heap_free(username);
+ heap_free(data.usernames);
+
return DI_OK;
}
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index b441743..0c94326 100644
index 6107ab2653..30483fe691 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -692,7 +692,7 @@ static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WC
@@ -364,10 +379,10 @@ index b441743..0c94326 100644
WCHAR *guid_str = NULL;
DIDEVICEINSTANCEW didev;
diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h
index af8d99d..36b71f7 100644
index ea794d7396..114e3971ed 100644
--- a/dlls/dinput/device_private.h
+++ b/dlls/dinput/device_private.h
@@ -123,6 +123,7 @@ extern const char *_dump_dinput_GUID(const GUID *guid) DECLSPEC_HIDDEN;
@@ -125,6 +125,7 @@ extern const char *_dump_dinput_GUID(const GUID *guid) DECLSPEC_HIDDEN;
extern LPDIOBJECTDATAFORMAT dataformat_to_odf_by_type(LPCDIDATAFORMAT df, int n, DWORD type) DECLSPEC_HIDDEN;
@@ -376,10 +391,18 @@ index af8d99d..36b71f7 100644
extern HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags, DWORD devMask, LPCDIDATAFORMAT df) DECLSPEC_HIDDEN;
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c
index 198c6a8..ee319f0 100644
index 0855cb41cd..7af377026c 100644
--- a/dlls/dinput/dinput_main.c
+++ b/dlls/dinput/dinput_main.c
@@ -1251,9 +1251,34 @@ static HRESULT WINAPI IDirectInput8AImpl_ConfigureDevices(
@@ -39,6 +39,7 @@
#define NONAMELESSUNION
#include "wine/debug.h"
+#include "wine/heap.h"
#include "wine/unicode.h"
#include "wine/asm.h"
#include "windef.h"
@@ -1253,9 +1254,34 @@ static HRESULT WINAPI IDirectInput8AImpl_ConfigureDevices(
/* Copy parameters */
diCDParamsW.dwSize = sizeof(DICONFIGUREDEVICESPARAMSW);
@@ -414,15 +437,15 @@ index 198c6a8..ee319f0 100644
diafW.rgoAction = HeapAlloc(GetProcessHeap(), 0, sizeof(DIACTIONW)*lpdiCDParams->lprgFormats->dwNumActions);
_copy_diactionformatAtoW(&diafW, lpdiCDParams->lprgFormats);
@@ -1281,6 +1306,8 @@ static HRESULT WINAPI IDirectInput8AImpl_ConfigureDevices(
@@ -1283,6 +1309,8 @@ static HRESULT WINAPI IDirectInput8AImpl_ConfigureDevices(
HeapFree(GetProcessHeap(), 0, diafW.rgoAction);
+ HeapFree(GetProcessHeap(), 0, (void*) diCDParamsW.lptszUserNames);
+ heap_free((void*) diCDParamsW.lptszUserNames);
+
return hr;
}
--
1.9.1
2.17.1

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