From 3945cbfe3669c2c03c4d621ae74d37350b7645ab Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 5 Oct 2017 05:12:57 +0200 Subject: [PATCH] Rebase against 9a53298eed493080fb132d0cd57fffa95b00b1ec. --- ...an-externally-set-DC-clipping-region.patch | 29 ----------- patches/gdiplus-DC_Handling/definition | 1 + ...dd-stub-for-RtlGetUnloadEventTraceEx.patch | 14 ++--- ...Add-stub-for-RtlQueryPackageIdentity.patch | 16 +++--- patches/patchinstall.sh | 42 +-------------- ...-a-new-alloc_handle-object-callback..patch | 52 +++++++++++-------- ...eference-to-the-parent-object-for-pi.patch | 46 ++++++++-------- ...rence-on-mapping-for-shared-mappings.patch | 40 -------------- patches/server-shared_mapping/definition | 1 - 9 files changed, 70 insertions(+), 171 deletions(-) delete mode 100644 patches/gdiplus-DC_Handling/0002-gdiplus-Ignore-an-externally-set-DC-clipping-region.patch delete mode 100644 patches/server-shared_mapping/0001-server-Keep-reference-on-mapping-for-shared-mappings.patch delete mode 100644 patches/server-shared_mapping/definition diff --git a/patches/gdiplus-DC_Handling/0002-gdiplus-Ignore-an-externally-set-DC-clipping-region.patch b/patches/gdiplus-DC_Handling/0002-gdiplus-Ignore-an-externally-set-DC-clipping-region.patch deleted file mode 100644 index 551b822e..00000000 --- a/patches/gdiplus-DC_Handling/0002-gdiplus-Ignore-an-externally-set-DC-clipping-region.patch +++ /dev/null @@ -1,29 +0,0 @@ -From c1d9a2c8a3b018f3b5c244d62c3515e2f5a47d49 Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -Date: Mon, 26 Dec 2016 21:22:02 +0800 -Subject: gdiplus: Ignore an externally set DC clipping region. - -gdiplus maintains its own graphics state. - -FIXME: perhaps some other places need a similar fix. ---- - dlls/gdiplus/graphics.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c -index e086dfc..47b7bda 100644 ---- a/dlls/gdiplus/graphics.c -+++ b/dlls/gdiplus/graphics.c -@@ -499,8 +499,7 @@ static GpStatus alpha_blend_pixels_hrgn(GpGraphics *graphics, INT dst_x, INT dst - - SetViewportOrgEx(graphics->hdc, 0, 0, NULL); - -- if (hrgn) -- ExtSelectClipRgn(graphics->hdc, hrgn, RGN_AND); -+ ExtSelectClipRgn(graphics->hdc, hrgn, RGN_COPY); - - if (hregion) - ExtSelectClipRgn(graphics->hdc, hregion, RGN_AND); --- -2.9.0 - diff --git a/patches/gdiplus-DC_Handling/definition b/patches/gdiplus-DC_Handling/definition index 464acd5b..ff2f943f 100644 --- a/patches/gdiplus-DC_Handling/definition +++ b/patches/gdiplus-DC_Handling/definition @@ -1 +1,2 @@ Fixes: [35372] Ignore externally set DC state in gdiplus +Disabled: true diff --git a/patches/ntdll-RtlGetUnloadEventTraceEx/0001-ntdll-Add-stub-for-RtlGetUnloadEventTraceEx.patch b/patches/ntdll-RtlGetUnloadEventTraceEx/0001-ntdll-Add-stub-for-RtlGetUnloadEventTraceEx.patch index 2bd85f73..405d2796 100644 --- a/patches/ntdll-RtlGetUnloadEventTraceEx/0001-ntdll-Add-stub-for-RtlGetUnloadEventTraceEx.patch +++ b/patches/ntdll-RtlGetUnloadEventTraceEx/0001-ntdll-Add-stub-for-RtlGetUnloadEventTraceEx.patch @@ -1,4 +1,4 @@ -From 84fb1ffc2b569926c2e6a303922706d068361301 Mon Sep 17 00:00:00 2001 +From de5759f4160f1cb0d163d629ba55dc7b516dbcee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Tue, 21 Mar 2017 23:27:06 +0100 Subject: ntdll: Add stub for RtlGetUnloadEventTraceEx. @@ -9,22 +9,22 @@ Subject: ntdll: Add stub for RtlGetUnloadEventTraceEx. 2 files changed, 15 insertions(+) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index 9921b4cb1c..3c50e20a8b 100644 +index c6f15c53ded..243ecb67ae4 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec -@@ -669,6 +669,7 @@ +@@ -670,6 +670,7 @@ # @ stub RtlGetSetBootStatusData @ stdcall RtlGetThreadErrorMode() - # @ stub RtlGetUnloadEventTrace + @ stdcall RtlGetUnloadEventTrace() +@ stdcall RtlGetUnloadEventTraceEx(ptr ptr ptr) @ stub RtlGetUserInfoHeap @ stdcall RtlGetVersion(ptr) @ stub RtlGuidToPropertySetName diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c -index 9b1fbbbcf5..098378c646 100644 +index 8ade7525f0e..315dac2c1ea 100644 --- a/dlls/ntdll/rtl.c +++ b/dlls/ntdll/rtl.c -@@ -1675,3 +1675,17 @@ NTSTATUS WINAPI RtlQueryPackageIdentity(HANDLE token, WCHAR *fullname, SIZE_T *f +@@ -1682,3 +1682,17 @@ NTSTATUS WINAPI RtlQueryPackageIdentity(HANDLE token, WCHAR *fullname, SIZE_T *f FIXME("(%p, %p, %p, %p, %p, %p): stub\n", token, fullname, fullname_size, appid, appid_size, packaged); return STATUS_NOT_FOUND; } @@ -43,5 +43,5 @@ index 9b1fbbbcf5..098378c646 100644 + if (trace) *trace = NULL; +} -- -2.11.0 +2.14.1 diff --git a/patches/ntdll-RtlQueryPackageIdentity/0001-ntdll-Add-stub-for-RtlQueryPackageIdentity.patch b/patches/ntdll-RtlQueryPackageIdentity/0001-ntdll-Add-stub-for-RtlQueryPackageIdentity.patch index e050c99b..03967b99 100644 --- a/patches/ntdll-RtlQueryPackageIdentity/0001-ntdll-Add-stub-for-RtlQueryPackageIdentity.patch +++ b/patches/ntdll-RtlQueryPackageIdentity/0001-ntdll-Add-stub-for-RtlQueryPackageIdentity.patch @@ -1,4 +1,4 @@ -From 3fad7f8640f1600a00896f82056423303e4cc3e0 Mon Sep 17 00:00:00 2001 +From cd1986bee6af083bfcb46eebdc3c40d040f35b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 17 Jan 2016 00:48:11 +0100 Subject: ntdll: Add stub for RtlQueryPackageIdentity. @@ -9,10 +9,10 @@ Subject: ntdll: Add stub for RtlQueryPackageIdentity. 2 files changed, 11 insertions(+) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index 4e49709..fee2e11 100644 +index 50f4acf5926..c6f15c53ded 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec -@@ -799,6 +799,7 @@ +@@ -810,6 +810,7 @@ @ stdcall RtlQueryInformationActivationContext(long long ptr long ptr long ptr) @ stub RtlQueryInformationActiveActivationContext @ stub RtlQueryInterfaceMemoryStream @@ -21,12 +21,12 @@ index 4e49709..fee2e11 100644 @ stdcall RtlQueryProcessDebugInformation(long long ptr) @ stub RtlQueryProcessHeapInformation diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c -index f699cff..37dce23 100644 +index 09a9c921bb5..8ade7525f0e 100644 --- a/dlls/ntdll/rtl.c +++ b/dlls/ntdll/rtl.c -@@ -1626,3 +1626,13 @@ NTSTATUS WINAPI RtlCreateUserProcess(UNICODE_STRING *path, ULONG attributes, RTL - parent, inherit, debug, exception, info); - return STATUS_NOT_IMPLEMENTED; +@@ -1672,3 +1672,13 @@ RTL_UNLOAD_EVENT_TRACE * WINAPI RtlGetUnloadEventTrace(void) + FIXME("stub!\n"); + return NULL; } + +/********************************************************************* @@ -39,5 +39,5 @@ index f699cff..37dce23 100644 + return STATUS_NOT_FOUND; +} -- -2.6.4 +2.14.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 7900c296..776edbc3 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "b34ea10112227a0d8554c81fc093c0cf6e1bc1b7" + echo "9a53298eed493080fb132d0cd57fffa95b00b1ec" } # Show version information @@ -176,7 +176,6 @@ patch_enable_all () enable_gdi32_MultiMonitor="$1" enable_gdi32_Path_Metafile="$1" enable_gdi32_Symbol_Truetype_Font="$1" - enable_gdiplus_DC_Handling="$1" enable_gdiplus_Performance_Improvements="$1" enable_hal_KeQueryPerformanceCounter="$1" enable_hnetcfg_INetFwAuthorizedApplication="$1" @@ -353,7 +352,6 @@ patch_enable_all () enable_server_device_manager_destroy="$1" enable_server_free_async_queue="$1" enable_server_send_hardware_message="$1" - enable_server_shared_mapping="$1" enable_setupapi_CM_Get_Parent="$1" enable_setupapi_DiskSpaceList="$1" enable_setupapi_Display_Device="$1" @@ -812,9 +810,6 @@ patch_enable () gdi32-Symbol_Truetype_Font) enable_gdi32_Symbol_Truetype_Font="$2" ;; - gdiplus-DC_Handling) - enable_gdiplus_DC_Handling="$2" - ;; gdiplus-Performance-Improvements) enable_gdiplus_Performance_Improvements="$2" ;; @@ -1343,9 +1338,6 @@ patch_enable () server-send_hardware_message) enable_server_send_hardware_message="$2" ;; - server-shared_mapping) - enable_server_shared_mapping="$2" - ;; setupapi-CM_Get_Parent) enable_setupapi_CM_Get_Parent="$2" ;; @@ -5069,23 +5061,6 @@ if test "$enable_gdi32_Symbol_Truetype_Font" -eq 1; then ) >> "$patchlist" fi -# Patchset gdiplus-DC_Handling -# | -# | This patchset fixes the following Wine bugs: -# | * [#35372] Ignore externally set DC state in gdiplus -# | -# | Modified files: -# | * dlls/gdiplus/graphics.c -# | -if test "$enable_gdiplus_DC_Handling" -eq 1; then - patch_apply gdiplus-DC_Handling/0001-gdiplus-Ignore-an-externally-set-DC-origin.patch - patch_apply gdiplus-DC_Handling/0002-gdiplus-Ignore-an-externally-set-DC-clipping-region.patch - ( - printf '%s\n' '+ { "Dmitry Timoshkov", "gdiplus: Ignore an externally set DC origin.", 1 },'; - printf '%s\n' '+ { "Dmitry Timoshkov", "gdiplus: Ignore an externally set DC clipping region.", 1 },'; - ) >> "$patchlist" -fi - # Patchset gdiplus-Performance-Improvements # | # | Modified files: @@ -7996,21 +7971,6 @@ if test "$enable_server_send_hardware_message" -eq 1; then ) >> "$patchlist" fi -# Patchset server-shared_mapping -# | -# | This patchset fixes the following Wine bugs: -# | * [#43829] Keep reference on mapping for shared PE mappings -# | -# | Modified files: -# | * server/mapping.c -# | -if test "$enable_server_shared_mapping" -eq 1; then - patch_apply server-shared_mapping/0001-server-Keep-reference-on-mapping-for-shared-mappings.patch - ( - printf '%s\n' '+ { "Sebastian Lackner", "server: Keep reference on mapping for shared mappings.", 1 },'; - ) >> "$patchlist" -fi - # Patchset setupapi-CM_Get_Parent # | # | This patchset fixes the following Wine bugs: diff --git a/patches/server-Desktop_Refcount/0001-server-Introduce-a-new-alloc_handle-object-callback..patch b/patches/server-Desktop_Refcount/0001-server-Introduce-a-new-alloc_handle-object-callback..patch index caec676f..13828324 100644 --- a/patches/server-Desktop_Refcount/0001-server-Introduce-a-new-alloc_handle-object-callback..patch +++ b/patches/server-Desktop_Refcount/0001-server-Introduce-a-new-alloc_handle-object-callback..patch @@ -1,4 +1,4 @@ -From 438997175c34fbc9e1e146bdecb36f104d80e98e Mon Sep 17 00:00:00 2001 +From 1544a5022eee2874dcf492fc9c863ce21344a572 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 4 Dec 2015 10:36:47 +0100 Subject: server: Introduce a new alloc_handle object callback. (v2) @@ -20,7 +20,7 @@ Signed-off-by: Sebastian Lackner server/handle.c | 13 +++++++++++-- server/hook.c | 1 + server/mailslot.c | 3 +++ - server/mapping.c | 2 ++ + server/mapping.c | 3 +++ server/mutex.c | 1 + server/named_pipe.c | 4 ++++ server/object.c | 4 ++++ @@ -39,7 +39,7 @@ Signed-off-by: Sebastian Lackner server/timer.c | 1 + server/token.c | 1 + server/winstation.c | 2 ++ - 34 files changed, 74 insertions(+), 3 deletions(-) + 34 files changed, 75 insertions(+), 3 deletions(-) diff --git a/server/async.c b/server/async.c index cf7a434ebca..9c7b9943975 100644 @@ -74,7 +74,7 @@ index 3ff75407d9f..7bebf136a21 100644 atom_table_destroy /* destroy */ }; diff --git a/server/change.c b/server/change.c -index 4dd7933f3ee..9340d4ad85c 100644 +index c5c88da58dd..49d577a44de 100644 --- a/server/change.c +++ b/server/change.c @@ -172,6 +172,7 @@ static const struct object_ops dir_ops = @@ -110,7 +110,7 @@ index 8b8983a157f..72dbc5b821f 100644 completion_destroy /* destroy */ }; diff --git a/server/console.c b/server/console.c -index 5b69e769a61..832f0d4af34 100644 +index cb6410b7741..89909c3569a 100644 --- a/server/console.c +++ b/server/console.c @@ -87,6 +87,7 @@ static const struct object_ops console_input_ops = @@ -138,7 +138,7 @@ index 5b69e769a61..832f0d4af34 100644 screen_buffer_destroy /* destroy */ }; diff --git a/server/debugger.c b/server/debugger.c -index 37f19347bb6..4d4f0035c2f 100644 +index 79b7e527f33..d658fc0625f 100644 --- a/server/debugger.c +++ b/server/debugger.c @@ -84,6 +84,7 @@ static const struct object_ops debug_event_ops = @@ -158,7 +158,7 @@ index 37f19347bb6..4d4f0035c2f 100644 debug_ctx_destroy /* destroy */ }; diff --git a/server/device.c b/server/device.c -index 192395dcc7f..a7844749040 100644 +index 90a4b6e8eec..4bb29d897e5 100644 --- a/server/device.c +++ b/server/device.c @@ -75,6 +75,7 @@ static const struct object_ops irp_call_ops = @@ -234,7 +234,7 @@ index cfc0f6afc0d..608fafb94d7 100644 no_destroy /* destroy */ }; diff --git a/server/fd.c b/server/fd.c -index 9322e2c1c15..721432a4ff3 100644 +index fa2b18a46b1..9dbf481259c 100644 --- a/server/fd.c +++ b/server/fd.c @@ -217,6 +217,7 @@ static const struct object_ops fd_ops = @@ -270,7 +270,7 @@ index 9322e2c1c15..721432a4ff3 100644 no_destroy /* destroy */ }; diff --git a/server/file.c b/server/file.c -index 39c8150cb28..418732c743d 100644 +index 6c036acb641..a7d8f95d972 100644 --- a/server/file.c +++ b/server/file.c @@ -95,6 +95,7 @@ static const struct object_ops file_ops = @@ -339,7 +339,7 @@ index 3a0e4b4d1d3..dc653b8c42e 100644 hook_table_destroy /* destroy */ }; diff --git a/server/mailslot.c b/server/mailslot.c -index d7affa514bf..671c969b9a5 100644 +index 9fafedbd204..531c9928e2f 100644 --- a/server/mailslot.c +++ b/server/mailslot.c @@ -89,6 +89,7 @@ static const struct object_ops mailslot_ops = @@ -350,7 +350,7 @@ index d7affa514bf..671c969b9a5 100644 fd_close_handle, /* close_handle */ mailslot_destroy /* destroy */ }; -@@ -143,6 +144,7 @@ static const struct object_ops mail_writer_ops = +@@ -144,6 +145,7 @@ static const struct object_ops mail_writer_ops = no_link_name, /* link_name */ NULL, /* unlink_name */ no_open_file, /* open_file */ @@ -358,7 +358,7 @@ index d7affa514bf..671c969b9a5 100644 fd_close_handle, /* close_handle */ mail_writer_destroy /* destroy */ }; -@@ -198,6 +200,7 @@ static const struct object_ops mailslot_device_ops = +@@ -200,6 +202,7 @@ static const struct object_ops mailslot_device_ops = directory_link_name, /* link_name */ default_unlink_name, /* unlink_name */ mailslot_device_open_file, /* open_file */ @@ -367,7 +367,7 @@ index d7affa514bf..671c969b9a5 100644 mailslot_device_destroy /* destroy */ }; diff --git a/server/mapping.c b/server/mapping.c -index b2d334c7889..f255ce18556 100644 +index f9f50edfa60..095cb03d7fb 100644 --- a/server/mapping.c +++ b/server/mapping.c @@ -77,6 +77,7 @@ static const struct object_ops ranges_ops = @@ -378,7 +378,15 @@ index b2d334c7889..f255ce18556 100644 no_close_handle, /* close_handle */ ranges_destroy /* destroy */ }; -@@ -131,6 +132,7 @@ static const struct object_ops mapping_ops = +@@ -111,6 +112,7 @@ static const struct object_ops shared_map_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ + no_open_file, /* open_file */ ++ no_alloc_handle, /* alloc_handle */ + no_close_handle, /* close_handle */ + shared_map_destroy /* destroy */ + }; +@@ -167,6 +169,7 @@ static const struct object_ops mapping_ops = directory_link_name, /* link_name */ default_unlink_name, /* unlink_name */ no_open_file, /* open_file */ @@ -399,10 +407,10 @@ index d1887e4bc45..a2a0a24bdc3 100644 mutex_destroy /* destroy */ }; diff --git a/server/named_pipe.c b/server/named_pipe.c -index 9cd424fe368..629814a6703 100644 +index 6f5b3b0bbd5..d7f8a583c92 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c -@@ -148,6 +148,7 @@ static const struct object_ops named_pipe_ops = +@@ -136,6 +136,7 @@ static const struct object_ops named_pipe_ops = named_pipe_link_name, /* link_name */ default_unlink_name, /* unlink_name */ named_pipe_open_file, /* open_file */ @@ -410,7 +418,7 @@ index 9cd424fe368..629814a6703 100644 no_close_handle, /* close_handle */ named_pipe_destroy /* destroy */ }; -@@ -184,6 +185,7 @@ static const struct object_ops pipe_server_ops = +@@ -173,6 +174,7 @@ static const struct object_ops pipe_server_ops = no_link_name, /* link_name */ NULL, /* unlink_name */ no_open_file, /* open_file */ @@ -418,7 +426,7 @@ index 9cd424fe368..629814a6703 100644 fd_close_handle, /* close_handle */ pipe_server_destroy /* destroy */ }; -@@ -227,6 +229,7 @@ static const struct object_ops pipe_client_ops = +@@ -216,6 +218,7 @@ static const struct object_ops pipe_client_ops = no_link_name, /* link_name */ NULL, /* unlink_name */ no_open_file, /* open_file */ @@ -426,7 +434,7 @@ index 9cd424fe368..629814a6703 100644 fd_close_handle, /* close_handle */ pipe_client_destroy /* destroy */ }; -@@ -273,6 +276,7 @@ static const struct object_ops named_pipe_device_ops = +@@ -263,6 +266,7 @@ static const struct object_ops named_pipe_device_ops = directory_link_name, /* link_name */ default_unlink_name, /* unlink_name */ named_pipe_device_open_file, /* open_file */ @@ -558,7 +566,7 @@ index 08ff1536cee..15e73925131 100644 no_destroy /* destroy */ }; diff --git a/server/serial.c b/server/serial.c -index 85dd104bc68..9842f9ef42c 100644 +index f7aaebbaf69..94b29c4eef2 100644 --- a/server/serial.c +++ b/server/serial.c @@ -102,6 +102,7 @@ static const struct object_ops serial_ops = @@ -594,7 +602,7 @@ index e35588a136c..6e788abde1c 100644 snapshot_destroy /* destroy */ }; diff --git a/server/sock.c b/server/sock.c -index cc9bbccad7e..e903770e4bb 100644 +index 1e126182190..0707515be00 100644 --- a/server/sock.c +++ b/server/sock.c @@ -155,6 +155,7 @@ static const struct object_ops sock_ops = @@ -605,7 +613,7 @@ index cc9bbccad7e..e903770e4bb 100644 fd_close_handle, /* close_handle */ sock_destroy /* destroy */ }; -@@ -978,6 +979,7 @@ static const struct object_ops ifchange_ops = +@@ -979,6 +980,7 @@ static const struct object_ops ifchange_ops = no_link_name, /* link_name */ NULL, /* unlink_name */ no_open_file, /* open_file */ diff --git a/patches/server-Pipe_ObjectName/0001-server-Store-a-reference-to-the-parent-object-for-pi.patch b/patches/server-Pipe_ObjectName/0001-server-Store-a-reference-to-the-parent-object-for-pi.patch index 4efad928..d8c8044d 100644 --- a/patches/server-Pipe_ObjectName/0001-server-Store-a-reference-to-the-parent-object-for-pi.patch +++ b/patches/server-Pipe_ObjectName/0001-server-Store-a-reference-to-the-parent-object-for-pi.patch @@ -1,14 +1,14 @@ -From 5a2f65ab4c02a8aedea1238e80fe00f509872cf1 Mon Sep 17 00:00:00 2001 +From 2136f244ce59e8aa255acff56659fef497ed6821 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Mon, 17 Aug 2015 01:11:47 +0200 Subject: server: Store a reference to the parent object for pipe servers. (v2) --- dlls/ntdll/tests/om.c | 3 --- - server/named_pipe.c | 45 +++++++++++++++++++++++++++++++++++++-------- + server/named_pipe.c | 44 ++++++++++++++++++++++++++++++++++++-------- server/object.c | 22 ++++++++++++++-------- server/object.h | 2 ++ - 4 files changed, 53 insertions(+), 19 deletions(-) + 4 files changed, 52 insertions(+), 19 deletions(-) diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 43c5ee46d71..9a1ba670ab7 100644 @@ -30,19 +30,19 @@ index 43c5ee46d71..9a1ba670ab7 100644 "name too short %s\n", wine_dbgstr_w(str->Buffer) ); trace( "got %s len %u\n", wine_dbgstr_w(str->Buffer), len ); diff --git a/server/named_pipe.c b/server/named_pipe.c -index abacf0a4b76..da1a4c78548 100644 +index d7f8a583c92..7104350a358 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c -@@ -163,6 +163,8 @@ static void pipe_end_reselect_async( struct fd *fd, struct async_queue *queue ); +@@ -153,6 +153,8 @@ static void pipe_end_reselect_async( struct fd *fd, struct async_queue *queue ); /* server end functions */ static void pipe_server_dump( struct object *obj, int verbose ); static struct fd *pipe_server_get_fd( struct object *obj ); +static int pipe_server_link_name( struct object *obj, struct object_name *name, struct object *parent ); +static void pipe_server_unlink_name( struct object *obj, struct object_name *name ); static void pipe_server_destroy( struct object *obj); - static int pipe_server_flush( struct fd *fd, struct async *async ); static int pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ); -@@ -182,8 +184,8 @@ static const struct object_ops pipe_server_ops = + +@@ -171,8 +173,8 @@ static const struct object_ops pipe_server_ops = default_get_sd, /* get_sd */ default_set_sd, /* set_sd */ no_lookup_name, /* lookup_name */ @@ -53,16 +53,16 @@ index abacf0a4b76..da1a4c78548 100644 no_open_file, /* open_file */ no_alloc_handle, /* alloc_handle */ fd_close_handle, /* close_handle */ -@@ -207,6 +209,8 @@ static const struct fd_ops pipe_server_fd_ops = +@@ -197,6 +199,8 @@ static const struct fd_ops pipe_server_fd_ops = static void pipe_client_dump( struct object *obj, int verbose ); static int pipe_client_signaled( struct object *obj, struct wait_queue_entry *entry ); static struct fd *pipe_client_get_fd( struct object *obj ); +static int pipe_client_link_name( struct object *obj, struct object_name *name, struct object *parent ); +static void pipe_client_unlink_name( struct object *obj, struct object_name *name ); static void pipe_client_destroy( struct object *obj ); - static int pipe_client_flush( struct fd *fd, struct async *async ); static int pipe_client_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ); -@@ -226,8 +230,8 @@ static const struct object_ops pipe_client_ops = + +@@ -215,8 +219,8 @@ static const struct object_ops pipe_client_ops = default_get_sd, /* get_sd */ default_set_sd, /* set_sd */ no_lookup_name, /* lookup_name */ @@ -73,7 +73,7 @@ index abacf0a4b76..da1a4c78548 100644 no_open_file, /* open_file */ no_alloc_handle, /* alloc_handle */ fd_close_handle, /* close_handle */ -@@ -478,6 +482,17 @@ static void pipe_end_destroy( struct pipe_end *pipe_end ) +@@ -458,6 +462,17 @@ static void pipe_end_destroy( struct pipe_end *pipe_end ) free_async_queue( &pipe_end->write_q ); } @@ -91,7 +91,7 @@ index abacf0a4b76..da1a4c78548 100644 static void pipe_server_destroy( struct object *obj) { struct pipe_server *server = (struct pipe_server *)obj; -@@ -507,6 +522,17 @@ static void pipe_server_destroy( struct object *obj) +@@ -483,6 +498,17 @@ static void pipe_server_destroy( struct object *obj) release_object( server->pipe ); } @@ -109,7 +109,7 @@ index abacf0a4b76..da1a4c78548 100644 static void pipe_client_destroy( struct object *obj) { struct pipe_client *client = (struct pipe_client *)obj; -@@ -1029,9 +1055,10 @@ static void init_pipe_end( struct pipe_end *pipe_end, unsigned int pipe_flags, d +@@ -978,9 +1004,10 @@ static void init_pipe_end( struct pipe_end *pipe_end, unsigned int pipe_flags, d static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned int options, unsigned int pipe_flags ) { @@ -121,13 +121,13 @@ index abacf0a4b76..da1a4c78548 100644 if (!server) return NULL; -@@ -1053,11 +1080,13 @@ static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned +@@ -1001,12 +1028,13 @@ static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned return server; } --static struct pipe_client *create_pipe_client( unsigned int flags, unsigned int pipe_flags, data_size_t buffer_size ) -+static struct pipe_client *create_pipe_client( struct named_pipe *pipe, unsigned int flags, -+ unsigned int pipe_flags, data_size_t buffer_size ) +-static struct pipe_client *create_pipe_client( unsigned int flags, unsigned int pipe_flags, ++static struct pipe_client *create_pipe_client( struct named_pipe *pipe, unsigned int flags, unsigned int pipe_flags, + data_size_t buffer_size, unsigned int options ) { + static const struct unicode_str str = { NULL, 0 }; struct pipe_client *client; @@ -137,15 +137,15 @@ index abacf0a4b76..da1a4c78548 100644 if (!client) return NULL; -@@ -1127,7 +1156,7 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc +@@ -1084,7 +1112,7 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc return NULL; } -- if ((client = create_pipe_client( options, pipe->flags, pipe->outsize ))) -+ if ((client = create_pipe_client( pipe, options, pipe->flags, pipe->outsize ))) +- if ((client = create_pipe_client( options, pipe->flags, pipe->outsize, options ))) ++ if ((client = create_pipe_client( pipe, options, pipe->flags, pipe->outsize, options ))) { - if (use_server_io( &server->pipe_end )) - { + server->pipe_end.fd = (struct fd *)grab_object( server->ioctl_fd ); + set_no_fd_status( server->ioctl_fd, STATUS_BAD_DEVICE_TYPE ); diff --git a/server/object.c b/server/object.c index 14cd38e6f7e..77772a8e38b 100644 --- a/server/object.c @@ -214,5 +214,5 @@ index 72ad8528c5a..ddb4410525b 100644 const struct unicode_str *name, unsigned int attributes, const struct security_descriptor *sd ); -- -2.13.1 +2.14.1 diff --git a/patches/server-shared_mapping/0001-server-Keep-reference-on-mapping-for-shared-mappings.patch b/patches/server-shared_mapping/0001-server-Keep-reference-on-mapping-for-shared-mappings.patch deleted file mode 100644 index 222c0138..00000000 --- a/patches/server-shared_mapping/0001-server-Keep-reference-on-mapping-for-shared-mappings.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 11ed96d6ecfa031fba1cbc80b4e9113bcad6173f Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Wed, 4 Oct 2017 03:20:48 +0200 -Subject: server: Keep reference on mapping for shared mappings. - ---- - server/mapping.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/server/mapping.c b/server/mapping.c -index 5db03f8861a..0a39df69c7a 100644 ---- a/server/mapping.c -+++ b/server/mapping.c -@@ -110,6 +110,7 @@ static const struct object_ops ranges_ops = - struct memory_view - { - struct list entry; /* entry in per-process view list */ -+ struct mapping *mapping; /* for shared PE mappings */ - struct fd *fd; /* fd for mapped file */ - struct ranges *committed; /* list of committed ranges in this mapping */ - unsigned int flags; /* SEC_* flags */ -@@ -336,6 +337,7 @@ static struct memory_view *find_mapped_view( struct process *process, client_ptr - - static void free_memory_view( struct memory_view *view ) - { -+ if (view->mapping) release_object( view->mapping ); - if (view->fd) release_object( view->fd ); - if (view->committed) release_object( view->committed ); - list_remove( &view->entry ); -@@ -989,6 +991,7 @@ DECL_HANDLER(map_view) - view->size = req->size; - view->start = req->start; - view->flags = mapping->flags; -+ view->mapping = mapping->shared_file ? (struct mapping *)grab_object( mapping ) : NULL; - view->fd = !is_fd_removable( mapping->fd ) ? (struct fd *)grab_object( mapping->fd ) : NULL; - view->committed = mapping->committed ? (struct ranges *)grab_object( mapping->committed ) : NULL; - list_add_tail( ¤t->process->views, &view->entry ); --- -2.14.1 - diff --git a/patches/server-shared_mapping/definition b/patches/server-shared_mapping/definition deleted file mode 100644 index ded33ed9..00000000 --- a/patches/server-shared_mapping/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [43829] Keep reference on mapping for shared PE mappings