diff --git a/patches/Compiler_Warnings/0021-d2d1-Avoid-implicit-cast-of-interface-pointer.patch b/patches/Compiler_Warnings/0021-d2d1-Avoid-implicit-cast-of-interface-pointer.patch index cf39386a..a00adb80 100644 --- a/patches/Compiler_Warnings/0021-d2d1-Avoid-implicit-cast-of-interface-pointer.patch +++ b/patches/Compiler_Warnings/0021-d2d1-Avoid-implicit-cast-of-interface-pointer.patch @@ -1,18 +1,18 @@ -From 929eaf5dcdca040cd82141ad5ddfdcbc6c5f4a03 Mon Sep 17 00:00:00 2001 +From 79ff79dba6d5c8008c53e4bcf5e38c3a54271091 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 22 Mar 2016 21:54:26 +0100 Subject: d2d1: Avoid implicit cast of interface pointer. --- - dlls/d2d1/brush.c | 6 +++--- + dlls/d2d1/brush.c | 8 ++++---- dlls/d2d1/geometry.c | 6 +++--- - 2 files changed, 6 insertions(+), 6 deletions(-) + 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/d2d1/brush.c b/dlls/d2d1/brush.c -index aa92318..19b0993 100644 +index 7f4c7bbb763..30d25fec4b4 100644 --- a/dlls/d2d1/brush.c +++ b/dlls/d2d1/brush.c -@@ -181,7 +181,7 @@ static void d2d_brush_init(struct d2d_brush *brush, ID2D1Factory *factory, +@@ -251,7 +251,7 @@ static void d2d_brush_init(struct d2d_brush *brush, ID2D1Factory *factory, static inline struct d2d_brush *impl_from_ID2D1SolidColorBrush(ID2D1SolidColorBrush *iface) { @@ -21,7 +21,7 @@ index aa92318..19b0993 100644 } static HRESULT STDMETHODCALLTYPE d2d_solid_color_brush_QueryInterface(ID2D1SolidColorBrush *iface, -@@ -318,7 +318,7 @@ void d2d_solid_color_brush_init(struct d2d_brush *brush, ID2D1Factory *factory, +@@ -394,7 +394,7 @@ HRESULT d2d_solid_color_brush_create(ID2D1Factory *factory, const D2D1_COLOR_F * static inline struct d2d_brush *impl_from_ID2D1LinearGradientBrush(ID2D1LinearGradientBrush *iface) { @@ -30,7 +30,16 @@ index aa92318..19b0993 100644 } static HRESULT STDMETHODCALLTYPE d2d_linear_gradient_brush_QueryInterface(ID2D1LinearGradientBrush *iface, -@@ -476,7 +476,7 @@ void d2d_linear_gradient_brush_init(struct d2d_brush *brush, ID2D1Factory *facto +@@ -580,7 +580,7 @@ HRESULT d2d_linear_gradient_brush_create(ID2D1Factory *factory, const D2D1_LINEA + + static inline struct d2d_brush *impl_from_ID2D1RadialGradientBrush(ID2D1RadialGradientBrush *iface) + { +- return CONTAINING_RECORD(iface, struct d2d_brush, ID2D1Brush_iface); ++ return CONTAINING_RECORD((ID2D1Brush *)iface, struct d2d_brush, ID2D1Brush_iface); + } + + static HRESULT STDMETHODCALLTYPE d2d_radial_gradient_brush_QueryInterface(ID2D1RadialGradientBrush *iface, +@@ -776,7 +776,7 @@ HRESULT d2d_radial_gradient_brush_create(ID2D1Factory *factory, const D2D1_BRUSH static inline struct d2d_brush *impl_from_ID2D1BitmapBrush(ID2D1BitmapBrush *iface) { @@ -40,10 +49,10 @@ index aa92318..19b0993 100644 static HRESULT STDMETHODCALLTYPE d2d_bitmap_brush_QueryInterface(ID2D1BitmapBrush *iface, diff --git a/dlls/d2d1/geometry.c b/dlls/d2d1/geometry.c -index 9fa1783..125c610 100644 +index a9588985642..b8457a9e1ea 100644 --- a/dlls/d2d1/geometry.c +++ b/dlls/d2d1/geometry.c -@@ -2022,7 +2022,7 @@ static const struct ID2D1GeometrySinkVtbl d2d_geometry_sink_vtbl = +@@ -3024,7 +3024,7 @@ static const struct ID2D1GeometrySinkVtbl d2d_geometry_sink_vtbl = static inline struct d2d_geometry *impl_from_ID2D1PathGeometry(ID2D1PathGeometry *iface) { @@ -52,7 +61,7 @@ index 9fa1783..125c610 100644 } static HRESULT STDMETHODCALLTYPE d2d_path_geometry_QueryInterface(ID2D1PathGeometry *iface, REFIID iid, void **out) -@@ -2283,7 +2283,7 @@ void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory +@@ -3540,7 +3540,7 @@ void d2d_path_geometry_init(struct d2d_geometry *geometry, ID2D1Factory *factory static inline struct d2d_geometry *impl_from_ID2D1RectangleGeometry(ID2D1RectangleGeometry *iface) { @@ -61,7 +70,7 @@ index 9fa1783..125c610 100644 } static HRESULT STDMETHODCALLTYPE d2d_rectangle_geometry_QueryInterface(ID2D1RectangleGeometry *iface, -@@ -2531,7 +2531,7 @@ HRESULT d2d_rectangle_geometry_init(struct d2d_geometry *geometry, ID2D1Factory +@@ -3876,7 +3876,7 @@ fail: static inline struct d2d_geometry *impl_from_ID2D1TransformedGeometry(ID2D1TransformedGeometry *iface) { @@ -71,5 +80,5 @@ index 9fa1783..125c610 100644 static HRESULT STDMETHODCALLTYPE d2d_transformed_geometry_QueryInterface(ID2D1TransformedGeometry *iface, -- -2.7.1 +2.14.1 diff --git a/patches/dwmapi-DwmSetIcon/0001-dwmapi-Add-stubs-for-DwmSetIconicLivePreviewBitmap-a.patch b/patches/dwmapi-DwmSetIcon/0001-dwmapi-Add-stubs-for-DwmSetIconicLivePreviewBitmap-a.patch index dd011371..f7b43ed4 100644 --- a/patches/dwmapi-DwmSetIcon/0001-dwmapi-Add-stubs-for-DwmSetIconicLivePreviewBitmap-a.patch +++ b/patches/dwmapi-DwmSetIcon/0001-dwmapi-Add-stubs-for-DwmSetIconicLivePreviewBitmap-a.patch @@ -1,27 +1,29 @@ -From 7fed7fb3a06902a325d3c66465f252b6ee8b45b7 Mon Sep 17 00:00:00 2001 +From daeefb5f46667a112242343f9ba95d905371bc78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Tue, 11 Jul 2017 23:59:58 +0200 Subject: dwmapi: Add stubs for DwmSetIconicLivePreviewBitmap and DwmSetIconicThumbnail. --- - dlls/dwmapi/dwmapi.spec | 2 ++ + dlls/dwmapi/dwmapi.spec | 4 ++-- dlls/dwmapi/dwmapi_main.c | 18 ++++++++++++++++++ - 2 files changed, 20 insertions(+) + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/dlls/dwmapi/dwmapi.spec b/dlls/dwmapi/dwmapi.spec -index 6adbcb947d5..6989fdbe1b7 100644 +index d81df3d8418..37447195b36 100644 --- a/dlls/dwmapi/dwmapi.spec +++ b/dlls/dwmapi/dwmapi.spec -@@ -39,6 +39,8 @@ - @ stub DwmQueryThumbnailSourceSize +@@ -80,8 +80,8 @@ @ stdcall DwmRegisterThumbnail(long long ptr) + # @ stub DwmRenderGesture @ stub DwmSetDxFrameDuration +-@ stub DwmSetIconicLivePreviewBitmap +-@ stub DwmSetIconicThumbnail +@ stdcall DwmSetIconicLivePreviewBitmap(long long ptr long) +@ stdcall DwmSetIconicThumbnail(long long long) @ stdcall DwmSetPresentParameters(ptr ptr) @ stdcall DwmSetWindowAttribute(long long ptr long) - @ stdcall DwmUnregisterThumbnail(long) + # @ stub DwmShowContact diff --git a/dlls/dwmapi/dwmapi_main.c b/dlls/dwmapi/dwmapi_main.c index 8c3472a5294..0e6ba3bed1c 100644 --- a/dlls/dwmapi/dwmapi_main.c @@ -49,5 +51,5 @@ index 8c3472a5294..0e6ba3bed1c 100644 + return S_OK; +}; -- -2.13.1 +2.14.1 diff --git a/patches/kernel32-PE_Loader_Fixes/0002-ntdll-If-PE-image-size-is-larger-than-the-backed-fil.patch b/patches/kernel32-PE_Loader_Fixes/0002-ntdll-If-PE-image-size-is-larger-than-the-backed-fil.patch index 5283be33..9af832d9 100644 --- a/patches/kernel32-PE_Loader_Fixes/0002-ntdll-If-PE-image-size-is-larger-than-the-backed-fil.patch +++ b/patches/kernel32-PE_Loader_Fixes/0002-ntdll-If-PE-image-size-is-larger-than-the-backed-fil.patch @@ -1,31 +1,28 @@ -From bbc0ffba68c07dbd27ba4c33b8b6f1a66783b8ff Mon Sep 17 00:00:00 2001 +From 446c35154c24406aa69522971bc31fb72bf854dc Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Mon, 2 Jan 2017 15:35:41 +0800 Subject: ntdll: If PE image size is larger than the backed file size then treat file as removable. --- - dlls/ntdll/virtual.c | 7 +++++++ - 1 file changed, 7 insertions(+) + dlls/ntdll/virtual.c | 4 ++++ + 1 file changed, 4 insertions(+) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c -index bdf94063871..1a60fec7cfd 100644 +index c64a31de045..ab72a9f9db5 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c -@@ -1163,6 +1163,13 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz +@@ -1375,6 +1375,10 @@ static NTSTATUS map_image( HANDLE hmapping, ACCESS_MASK access, int fd, char *ba /* unaligned sections, this happens for native subsystem binaries */ /* in that case Windows simply maps in the whole file */ + /* if the image size is larger than the backed file size we can't mmap it */ + if (total_size > ROUND_SIZE( 0, st.st_size )) -+ { -+ close_handle( dup_mapping ); -+ dup_mapping = 0; -+ } ++ removable = TRUE; + if (map_file_into_view( view, fd, 0, total_size, 0, VPROT_COMMITTED | VPROT_READ | VPROT_WRITECOPY, - !dup_mapping ) != STATUS_SUCCESS) goto error; + removable ) != STATUS_SUCCESS) goto error; -- -2.11.0 +2.14.1 diff --git a/patches/ntdll-NtQueryVirtualMemory/0001-server-Store-full-path-for-ntdll-kernel32-dll.patch b/patches/ntdll-NtQueryVirtualMemory/0001-server-Store-full-path-for-ntdll-kernel32-dll.patch index a5af4fc9..7a0af15d 100644 --- a/patches/ntdll-NtQueryVirtualMemory/0001-server-Store-full-path-for-ntdll-kernel32-dll.patch +++ b/patches/ntdll-NtQueryVirtualMemory/0001-server-Store-full-path-for-ntdll-kernel32-dll.patch @@ -1,4 +1,4 @@ -From d3932f7ec92691aa77a75840883597a1c652f8c9 Mon Sep 17 00:00:00 2001 +From d8981a09da0f1c117f6888c0388b8b5c9ca44292 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 28 May 2017 09:04:10 +0200 Subject: server: Store full path for ntdll/kernel32 dll. @@ -10,10 +10,10 @@ Subject: server: Store full path for ntdll/kernel32 dll. 3 files changed, 37 insertions(+) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 518a99f5900..76d399a6cc6 100644 +index 9ba29ac7eac..4cb33f4f33f 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -3309,6 +3309,14 @@ void CDECL __wine_init_windows_dir( const WCHAR *windir, const WCHAR *sysdir ) +@@ -3931,6 +3931,14 @@ void CDECL __wine_init_windows_dir( const WCHAR *windir, const WCHAR *sysdir ) RtlInitUnicodeString( &mod->FullDllName, buffer ); RtlInitUnicodeString( &mod->BaseDllName, p ); } @@ -29,7 +29,7 @@ index 518a99f5900..76d399a6cc6 100644 diff --git a/server/process.c b/server/process.c -index 5eabbbef8ef..9204c8954c7 100644 +index b4657edd650..089e77a38ee 100644 --- a/server/process.c +++ b/server/process.c @@ -49,6 +49,8 @@ @@ -41,8 +41,8 @@ index 5eabbbef8ef..9204c8954c7 100644 /* process structure */ static struct list process_list = LIST_INIT(process_list); -@@ -1502,6 +1504,27 @@ DECL_HANDLER(load_dll) - if (mapping) release_object( mapping ); +@@ -1625,6 +1627,27 @@ DECL_HANDLER(load_dll) + } } +/* prepend the system dir to the name of the already created modules */ @@ -70,10 +70,10 @@ index 5eabbbef8ef..9204c8954c7 100644 DECL_HANDLER(unload_dll) { diff --git a/server/protocol.def b/server/protocol.def -index 7eaaec2b823..2f043bef50d 100644 +index af18bc83031..0bcff7b2b25 100644 --- a/server/protocol.def +++ b/server/protocol.def -@@ -949,6 +949,12 @@ struct rawinput_device +@@ -970,6 +970,12 @@ struct rawinput_device @END @@ -87,5 +87,5 @@ index 7eaaec2b823..2f043bef50d 100644 @REQ(unload_dll) mod_handle_t base; /* base address */ -- -2.12.2 +2.14.1 diff --git a/patches/ntdll-NtQueryVirtualMemory/0003-ntdll-Implement-NtQueryVirtualMemory-MemorySectionNa.patch b/patches/ntdll-NtQueryVirtualMemory/0003-ntdll-Implement-NtQueryVirtualMemory-MemorySectionNa.patch index 68971d21..48b4ae42 100644 --- a/patches/ntdll-NtQueryVirtualMemory/0003-ntdll-Implement-NtQueryVirtualMemory-MemorySectionNa.patch +++ b/patches/ntdll-NtQueryVirtualMemory/0003-ntdll-Implement-NtQueryVirtualMemory-MemorySectionNa.patch @@ -1,53 +1,29 @@ -From cf7fe40a5d1897b86b655b9bbe3686d77cd3bcd6 Mon Sep 17 00:00:00 2001 +From 0dd49a3b6d7951374e0bd120535f02377112064c Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Sun, 28 May 2017 05:19:30 +0200 Subject: ntdll: Implement NtQueryVirtualMemory(MemorySectionName). (v3) Contains several improvements by Sebastian Lackner . --- - dlls/ntdll/virtual.c | 109 +++++++++++++++++++++++++++++++++++++++++- - dlls/psapi/tests/psapi_main.c | 8 +--- - 2 files changed, 109 insertions(+), 8 deletions(-) + dlls/ntdll/virtual.c | 92 ++++++++++++++++++++++++++++++++++++++++++- + dlls/psapi/tests/psapi_main.c | 8 +--- + server/mapping.c | 29 ++++++++++++++ + server/protocol.def | 9 +++++ + 4 files changed, 130 insertions(+), 8 deletions(-) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c -index 5e92cbb50ea..4ee48ec93ab 100644 +index 4c927597a9f..164186f274b 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c -@@ -2439,6 +2439,33 @@ static int get_free_mem_state_callback( void *start, size_t size, void *arg ) +@@ -2653,6 +2653,7 @@ static int get_free_mem_state_callback( void *start, size_t size, void *arg ) return 1; } -+/* get the section mapping handle */ -+static NTSTATUS get_section_mapping( HANDLE process, LPCVOID addr, HANDLE *mapping ) -+{ -+ struct file_view *view; -+ NTSTATUS status = STATUS_INVALID_ADDRESS; -+ sigset_t sigset; -+ char *base; -+ -+ if (process != NtCurrentProcess()) -+ { -+ FIXME( "query section mapping from other process not implemented yet\n" ); -+ return STATUS_NOT_IMPLEMENTED; -+ } -+ -+ base = ROUND_ADDR( addr, page_mask ); -+ -+ server_enter_uninterrupted_section( &csVirtual, &sigset ); -+ if ((view = VIRTUAL_FindView( base, 0 )) && view->mapping) -+ { -+ status = NtDuplicateObject( NtCurrentProcess(), view->mapping, NtCurrentProcess(), -+ mapping, 0, 0, DUP_HANDLE_SAME_ACCESS ); -+ } -+ server_leave_uninterrupted_section( &csVirtual, &sigset ); -+ return status; -+} -+ + /* get basic information about a memory block */ static NTSTATUS get_basic_memory_info( HANDLE process, LPCVOID addr, MEMORY_BASIC_INFORMATION *info, -@@ -2560,6 +2587,84 @@ static NTSTATUS get_basic_memory_info( HANDLE process, LPCVOID addr, +@@ -2774,6 +2775,93 @@ static NTSTATUS get_basic_memory_info( HANDLE process, LPCVOID addr, } @@ -65,7 +41,16 @@ index 5e92cbb50ea..4ee48ec93ab 100644 + + if (!addr || !info || !res_len) return STATUS_INVALID_PARAMETER; + -+ if (!(status = get_section_mapping( process, addr, &mapping ))) ++ SERVER_START_REQ( get_mapping_file ) ++ { ++ req->process = wine_server_obj_handle( process ); ++ req->addr = wine_server_client_ptr( addr ); ++ status = wine_server_call( req ); ++ mapping = wine_server_ptr_handle( reply->handle ); ++ } ++ SERVER_END_REQ; ++ ++ if (!status && mapping) + { + status = server_get_unix_name( mapping, &unix_name ); + close_handle( mapping ); @@ -132,7 +117,7 @@ index 5e92cbb50ea..4ee48ec93ab 100644 #define UNIMPLEMENTED_INFO_CLASS(c) \ case c: \ FIXME("(process=%p,addr=%p) Unimplemented information class: " #c "\n", process, addr); \ -@@ -2581,8 +2686,10 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr, +@@ -2795,8 +2883,10 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr, case MemoryBasicInformation: return get_basic_memory_info( process, addr, buffer, len, res_len ); @@ -145,10 +130,10 @@ index 5e92cbb50ea..4ee48ec93ab 100644 default: diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c -index e35a7b694cb..56bf11a9a85 100644 +index e7af5bc61cc..ef5ae19aeaf 100644 --- a/dlls/psapi/tests/psapi_main.c +++ b/dlls/psapi/tests/psapi_main.c -@@ -330,14 +330,7 @@ static BOOL nt_get_mapped_file_name(HANDLE process, LPVOID addr, LPWSTR name, DW +@@ -342,14 +342,7 @@ static BOOL nt_get_mapped_file_name(HANDLE process, LPVOID addr, LPWSTR name, DW ret_len = 0xdeadbeef; status = pNtQueryVirtualMemory(process, addr, MemorySectionName, buf, buf_len, &ret_len); @@ -163,7 +148,7 @@ index e35a7b694cb..56bf11a9a85 100644 section_name = (MEMORY_SECTION_NAME *)buf; ok(ret_len == section_name->SectionFileName.MaximumLength + sizeof(*section_name), "got %lu, %u\n", -@@ -459,6 +452,7 @@ todo_wine { +@@ -471,6 +464,7 @@ todo_wine { { ok(memcmp(map_nameW, nt_map_name, lstrlenW(map_nameW)) == 0, "map name does not start with a device name: %s\n", map_name); WideCharToMultiByte(CP_ACP, 0, map_nameW, -1, map_name, MAX_PATH, NULL, NULL); @@ -171,6 +156,66 @@ index e35a7b694cb..56bf11a9a85 100644 ok(memcmp(map_name, device_name, strlen(device_name)) == 0, "map name does not start with a device name: %s\n", map_name); } +diff --git a/server/mapping.c b/server/mapping.c +index a6d34f91aff..8459c316559 100644 +--- a/server/mapping.c ++++ b/server/mapping.c +@@ -1011,6 +1011,35 @@ DECL_HANDLER(unmap_view) + if (view) free_memory_view( view ); + } + ++/* get file handle from mapping by address */ ++DECL_HANDLER(get_mapping_file) ++{ ++ struct memory_view *view; ++ struct process *process; ++ struct file *file; ++ ++ if (!(process = get_process_from_handle( req->process, 0 ))) return; ++ ++ LIST_FOR_EACH_ENTRY( view, &process->views, struct memory_view, entry ) ++ if (req->addr >= view->base && req->addr < view->base + view->size) break; ++ ++ if (&view->entry == &process->views) ++ { ++ set_error( STATUS_NOT_MAPPED_VIEW ); ++ release_object( process ); ++ return; ++ } ++ ++ if (view->fd && (file = create_file_for_fd_obj( view->fd, GENERIC_READ, ++ FILE_SHARE_READ | FILE_SHARE_WRITE ))) ++ { ++ reply->handle = alloc_handle( process, file, GENERIC_READ, 0 ); ++ release_object( file ); ++ } ++ ++ release_object( process ); ++} ++ + /* get a range of committed pages in a file mapping */ + DECL_HANDLER(get_mapping_committed_range) + { +diff --git a/server/protocol.def b/server/protocol.def +index 0bcff7b2b25..f248b3bdec7 100644 +--- a/server/protocol.def ++++ b/server/protocol.def +@@ -1782,6 +1782,15 @@ enum char_info_mode + @END + + ++/* Get file for a mapping */ ++@REQ(get_mapping_file) ++ obj_handle_t process; /* process handle */ ++ client_ptr_t addr; /* arbitrary address in view */ ++@REPLY ++ obj_handle_t handle; /* handle to file */ ++@END ++ ++ + /* Get a range of committed pages in a file mapping */ + @REQ(get_mapping_committed_range) + client_ptr_t base; /* view base address */ -- 2.14.1 diff --git a/patches/ntdll-NtQueryVirtualMemory/0006-ntdll-Allow-to-query-section-names-from-other-proces.patch b/patches/ntdll-NtQueryVirtualMemory/0006-ntdll-Allow-to-query-section-names-from-other-proces.patch index ccfbe977..9991b01f 100644 --- a/patches/ntdll-NtQueryVirtualMemory/0006-ntdll-Allow-to-query-section-names-from-other-proces.patch +++ b/patches/ntdll-NtQueryVirtualMemory/0006-ntdll-Allow-to-query-section-names-from-other-proces.patch @@ -1,101 +1,17 @@ -From b808bca5ed050a801ae03493788e8c8ec8e3cd38 Mon Sep 17 00:00:00 2001 +From 996792332616f1daf63bd0fe539245c96550cdb7 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 28 May 2017 05:44:38 +0200 Subject: ntdll: Allow to query section names from other processes. (v2) --- - dlls/ntdll/ntdll_misc.h | 1 + - dlls/ntdll/server.c | 13 +++++++++++++ - dlls/ntdll/virtual.c | 18 ++++++++++++++---- dlls/psapi/tests/psapi_main.c | 19 +++++++++++++++++++ - server/protocol.def | 13 +++++++++++++ - server/thread.c | 9 +++++++++ - 6 files changed, 69 insertions(+), 4 deletions(-) + 1 file changed, 19 insertions(+) -diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index ac81c9be9c8..ecee4a193d9 100644 ---- a/dlls/ntdll/ntdll_misc.h -+++ b/dlls/ntdll/ntdll_misc.h -@@ -161,6 +161,7 @@ extern NTSTATUS nt_to_unix_file_name_attr( const OBJECT_ATTRIBUTES *attr, ANSI_S - UINT disposition ) DECLSPEC_HIDDEN; - - /* virtual memory */ -+extern NTSTATUS virtual_get_section_mapping( HANDLE process, LPCVOID addr, HANDLE *mapping ) DECLSPEC_HIDDEN; - extern void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info ) DECLSPEC_HIDDEN; - extern NTSTATUS virtual_create_builtin_view( void *base ) DECLSPEC_HIDDEN; - extern NTSTATUS virtual_alloc_thread_stack( TEB *teb, SIZE_T reserve_size, SIZE_T commit_size ) DECLSPEC_HIDDEN; -diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c -index c02a12ab19a..290d7582f65 100644 ---- a/dlls/ntdll/server.c -+++ b/dlls/ntdll/server.c -@@ -464,6 +464,19 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result ) - } - break; - } -+ case APC_VIRTUAL_SECTION: -+ { -+ HANDLE mapping; -+ result->type = call->type; -+ addr = wine_server_get_ptr( call->virtual_section.addr ); -+ if ((ULONG_PTR)addr == call->virtual_section.addr) -+ { -+ result->virtual_section.status = virtual_get_section_mapping( NtCurrentProcess(), addr, &mapping ); -+ result->virtual_section.mapping = wine_server_obj_handle( mapping ); -+ } -+ else result->virtual_section.status = STATUS_WORKING_SET_LIMIT_RANGE; -+ break; -+ } - case APC_VIRTUAL_PROTECT: - result->type = call->type; - addr = wine_server_get_ptr( call->virtual_protect.addr ); -diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c -index 4ee48ec93ab..613caec6642 100644 ---- a/dlls/ntdll/virtual.c -+++ b/dlls/ntdll/virtual.c -@@ -2440,7 +2440,7 @@ static int get_free_mem_state_callback( void *start, size_t size, void *arg ) - } - - /* get the section mapping handle */ --static NTSTATUS get_section_mapping( HANDLE process, LPCVOID addr, HANDLE *mapping ) -+NTSTATUS virtual_get_section_mapping( HANDLE process, LPCVOID addr, HANDLE *mapping ) - { - struct file_view *view; - NTSTATUS status = STATUS_INVALID_ADDRESS; -@@ -2449,8 +2449,18 @@ static NTSTATUS get_section_mapping( HANDLE process, LPCVOID addr, HANDLE *mappi - - if (process != NtCurrentProcess()) - { -- FIXME( "query section mapping from other process not implemented yet\n" ); -- return STATUS_NOT_IMPLEMENTED; -+ apc_call_t call; -+ apc_result_t result; -+ -+ memset( &call, 0, sizeof(call) ); -+ -+ call.virtual_section.type = APC_VIRTUAL_SECTION; -+ call.virtual_section.addr = wine_server_client_ptr( addr ); -+ status = server_queue_process_apc( process, &call, &result ); -+ if (status != STATUS_SUCCESS) return status; -+ -+ *mapping = wine_server_ptr_handle( result.virtual_section.mapping ); -+ return result.virtual_section.status; - } - - base = ROUND_ADDR( addr, page_mask ); -@@ -2601,7 +2611,7 @@ static NTSTATUS get_section_name( HANDLE process, LPCVOID addr, - - if (!addr || !info || !res_len) return STATUS_INVALID_PARAMETER; - -- if (!(status = get_section_mapping( process, addr, &mapping ))) -+ if (!(status = virtual_get_section_mapping( process, addr, &mapping ))) - { - status = server_get_unix_name( mapping, &unix_name ); - close_handle( mapping ); diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c -index 56bf11a9a85..23025eedab3 100644 +index ef5ae19aeaf..ee027480ec5 100644 --- a/dlls/psapi/tests/psapi_main.c +++ b/dlls/psapi/tests/psapi_main.c -@@ -356,6 +356,10 @@ static void test_GetMappedFileName(void) +@@ -368,6 +368,10 @@ static void test_GetMappedFileName(void) char temp_path[MAX_PATH], file_name[MAX_PATH], map_name[MAX_PATH], device_name[MAX_PATH], drive[3]; WCHAR map_nameW[MAX_PATH], nt_map_name[MAX_PATH]; HANDLE hfile, hmap; @@ -106,7 +22,7 @@ index 56bf11a9a85..23025eedab3 100644 SetLastError(0xdeadbeef); ret = pGetMappedFileNameA(NULL, hMod, szMapPath, sizeof(szMapPath)); -@@ -456,6 +460,20 @@ todo_wine +@@ -468,6 +472,20 @@ todo_wine ok(memcmp(map_name, device_name, strlen(device_name)) == 0, "map name does not start with a device name: %s\n", map_name); } @@ -127,7 +43,7 @@ index 56bf11a9a85..23025eedab3 100644 SetLastError(0xdeadbeef); ret = pGetMappedFileNameA(GetCurrentProcess(), base + 0x2000, map_name, sizeof(map_name)); todo_wine { -@@ -501,6 +519,7 @@ todo_wine +@@ -513,6 +531,7 @@ todo_wine todo_wine ok(GetLastError() == ERROR_FILE_INVALID, "expected ERROR_FILE_INVALID, got %d\n", GetLastError()); @@ -135,71 +51,6 @@ index 56bf11a9a85..23025eedab3 100644 UnmapViewOfFile(base); CloseHandle(hmap); } -diff --git a/server/protocol.def b/server/protocol.def -index ca54b448ebb..504362702b8 100644 ---- a/server/protocol.def -+++ b/server/protocol.def -@@ -448,6 +448,7 @@ enum apc_type - APC_VIRTUAL_ALLOC, - APC_VIRTUAL_FREE, - APC_VIRTUAL_QUERY, -+ APC_VIRTUAL_SECTION, - APC_VIRTUAL_PROTECT, - APC_VIRTUAL_FLUSH, - APC_VIRTUAL_LOCK, -@@ -505,6 +506,12 @@ typedef union - client_ptr_t addr; /* requested address */ - } virtual_query; - struct -+ { -+ enum apc_type type; /* APC_VIRTUAL_SECTION */ -+ int __pad; -+ client_ptr_t addr; /* requested address */ -+ } virtual_section; -+ struct - { - enum apc_type type; /* APC_VIRTUAL_PROTECT */ - unsigned int prot; /* new protection flags */ -@@ -596,6 +603,12 @@ typedef union - unsigned short alloc_type;/* resulting region allocation type */ - } virtual_query; - struct -+ { -+ enum apc_type type; /* APC_VIRTUAL_SECTION */ -+ unsigned int status; /* status returned by call */ -+ obj_handle_t mapping; /* resulting mapping */ -+ } virtual_section; -+ struct - { - enum apc_type type; /* APC_VIRTUAL_PROTECT */ - unsigned int status; /* status returned by call */ -diff --git a/server/thread.c b/server/thread.c -index 903420bed3f..d3cbcc298c3 100644 ---- a/server/thread.c -+++ b/server/thread.c -@@ -1484,6 +1484,14 @@ DECL_HANDLER(select) - apc->result.create_thread.handle = handle; - clear_error(); /* ignore errors from the above calls */ - } -+ else if (apc->result.type == APC_VIRTUAL_SECTION) /* duplicate the handle to the caller process */ -+ { -+ obj_handle_t mapping = duplicate_handle( current->process, apc->result.virtual_section.mapping, -+ apc->caller->process, 0, 0, DUP_HANDLE_SAME_ACCESS ); -+ close_handle( current->process, apc->result.virtual_section.mapping ); -+ apc->result.virtual_section.mapping = mapping; -+ clear_error(); /* ignore errors from the above calls */ -+ } - else if (apc->result.type == APC_ASYNC_IO) - { - if (apc->owner) -@@ -1544,6 +1552,7 @@ DECL_HANDLER(queue_apc) - process = get_process_from_handle( req->handle, PROCESS_VM_OPERATION ); - break; - case APC_VIRTUAL_QUERY: -+ case APC_VIRTUAL_SECTION: - process = get_process_from_handle( req->handle, PROCESS_QUERY_INFORMATION ); - break; - case APC_MAP_VIEW: -- 2.14.1 diff --git a/patches/ntdll-NtQueryVirtualMemory/0008-ntdll-Resolve-drive-symlinks-before-returning-sectio.patch b/patches/ntdll-NtQueryVirtualMemory/0008-ntdll-Resolve-drive-symlinks-before-returning-sectio.patch index dd656f58..b6caf36a 100644 --- a/patches/ntdll-NtQueryVirtualMemory/0008-ntdll-Resolve-drive-symlinks-before-returning-sectio.patch +++ b/patches/ntdll-NtQueryVirtualMemory/0008-ntdll-Resolve-drive-symlinks-before-returning-sectio.patch @@ -1,4 +1,4 @@ -From 9a69e1e68004fb9b430151c629855ea7df2b0a8c Mon Sep 17 00:00:00 2001 +From 66e9d350993b7349f2309edd72945e01b6233d1c Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 28 May 2017 11:17:26 +0200 Subject: ntdll: Resolve drive symlinks before returning section name. @@ -11,10 +11,10 @@ Subject: ntdll: Resolve drive symlinks before returning section name. 4 files changed, 35 insertions(+), 12 deletions(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c -index 97b42398bb0..c0b2a1ea83e 100644 +index 2fb30febd63..8f50a81610b 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c -@@ -2932,7 +2932,7 @@ static NTSTATUS nt_to_unix_file_name_internal( const UNICODE_STRING *nameW, ANSI +@@ -2927,7 +2927,7 @@ static NTSTATUS nt_to_unix_file_name_internal( const UNICODE_STRING *nameW, ANSI } /* read the contents of an NT symlink object */ @@ -24,22 +24,22 @@ index 97b42398bb0..c0b2a1ea83e 100644 OBJECT_ATTRIBUTES attr; UNICODE_STRING targetW; diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index ecee4a193d9..e8586486a58 100644 +index 823024215e0..a61638cdc06 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -161,6 +161,7 @@ extern NTSTATUS nt_to_unix_file_name_attr( const OBJECT_ATTRIBUTES *attr, ANSI_S +@@ -169,6 +169,7 @@ extern NTSTATUS nt_to_unix_file_name_attr( const OBJECT_ATTRIBUTES *attr, ANSI_S UINT disposition ) DECLSPEC_HIDDEN; /* virtual memory */ +extern NTSTATUS read_nt_symlink( HANDLE root, UNICODE_STRING *name, WCHAR *target, size_t length ) DECLSPEC_HIDDEN; - extern NTSTATUS virtual_get_section_mapping( HANDLE process, LPCVOID addr, HANDLE *mapping ) DECLSPEC_HIDDEN; extern void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info ) DECLSPEC_HIDDEN; extern NTSTATUS virtual_create_builtin_view( void *base ) DECLSPEC_HIDDEN; + extern NTSTATUS virtual_alloc_thread_stack( TEB *teb, SIZE_T reserve_size, SIZE_T commit_size ) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c -index 613caec6642..467ce54eaaa 100644 +index 164186f274b..85a7f4dc059 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c -@@ -53,6 +53,7 @@ +@@ -56,6 +56,7 @@ #include "wine/library.h" #include "wine/server.h" #include "wine/exception.h" @@ -47,7 +47,7 @@ index 613caec6642..467ce54eaaa 100644 #include "wine/rbtree.h" #include "wine/debug.h" #include "ntdll_misc.h" -@@ -152,6 +153,8 @@ static BYTE **pages_vprot; +@@ -163,6 +164,8 @@ static BYTE **pages_vprot; static BYTE *pages_vprot; #endif @@ -56,7 +56,7 @@ index 613caec6642..467ce54eaaa 100644 static struct file_view *view_block_start, *view_block_end, *next_free_view; static const size_t view_block_size = 0x100000; static void *preload_reserve_start; -@@ -2602,12 +2605,15 @@ static NTSTATUS get_section_name( HANDLE process, LPCVOID addr, +@@ -2780,12 +2783,15 @@ static NTSTATUS get_section_name( HANDLE process, LPCVOID addr, MEMORY_SECTION_NAME *info, SIZE_T len, SIZE_T *res_len ) { @@ -73,7 +73,7 @@ index 613caec6642..467ce54eaaa 100644 if (!addr || !info || !res_len) return STATUS_INVALID_PARAMETER; -@@ -2657,14 +2663,34 @@ static NTSTATUS get_section_name( HANDLE process, LPCVOID addr, +@@ -2844,14 +2850,34 @@ static NTSTATUS get_section_name( HANDLE process, LPCVOID addr, } found: @@ -114,10 +114,10 @@ index 613caec6642..467ce54eaaa 100644 else status = (len < sizeof(MEMORY_SECTION_NAME)) ? STATUS_INFO_LENGTH_MISMATCH : STATUS_BUFFER_OVERFLOW; diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c -index 0751bb24fb8..dd592a9ab21 100644 +index 6014d6fc152..8704123642e 100644 --- a/dlls/psapi/tests/psapi_main.c +++ b/dlls/psapi/tests/psapi_main.c -@@ -434,7 +434,6 @@ static void test_GetMappedFileName(void) +@@ -446,7 +446,6 @@ static void test_GetMappedFileName(void) ret = pGetMappedFileNameA(GetCurrentProcess(), base, map_name, sizeof(map_name)); ok(ret, "GetMappedFileName error %d\n", GetLastError()); ok(ret > strlen(device_name), "map_name should be longer than device_name\n"); @@ -125,7 +125,7 @@ index 0751bb24fb8..dd592a9ab21 100644 ok(memcmp(map_name, device_name, strlen(device_name)) == 0, "map name does not start with a device name: %s\n", map_name); SetLastError(0xdeadbeef); -@@ -446,7 +445,6 @@ todo_wine +@@ -458,7 +457,6 @@ todo_wine { ok(memcmp(map_nameW, nt_map_name, lstrlenW(map_nameW)) == 0, "map name does not start with a device name: %s\n", map_name); WideCharToMultiByte(CP_ACP, 0, map_nameW, -1, map_name, MAX_PATH, NULL, NULL); @@ -133,7 +133,7 @@ index 0751bb24fb8..dd592a9ab21 100644 ok(memcmp(map_name, device_name, strlen(device_name)) == 0, "map name does not start with a device name: %s\n", map_name); } -@@ -459,7 +457,6 @@ todo_wine +@@ -471,7 +469,6 @@ todo_wine { ok(memcmp(map_nameW, nt_map_name, lstrlenW(map_nameW)) == 0, "map name does not start with a device name: %s\n", map_name); WideCharToMultiByte(CP_ACP, 0, map_nameW, -1, map_name, MAX_PATH, NULL, NULL); @@ -141,7 +141,7 @@ index 0751bb24fb8..dd592a9ab21 100644 ok(memcmp(map_name, device_name, strlen(device_name)) == 0, "map name does not start with a device name: %s\n", map_name); } -@@ -467,7 +464,6 @@ todo_wine +@@ -479,7 +476,6 @@ todo_wine ret = pGetMappedFileNameA(GetCurrentProcess(), base + 0x2000, map_name, sizeof(map_name)); ok(ret, "GetMappedFileName error %d\n", GetLastError()); ok(ret > strlen(device_name), "map_name should be longer than device_name\n"); @@ -149,7 +149,7 @@ index 0751bb24fb8..dd592a9ab21 100644 ok(memcmp(map_name, device_name, strlen(device_name)) == 0, "map name does not start with a device name: %s\n", map_name); SetLastError(0xdeadbeef); -@@ -552,7 +548,7 @@ static void test_GetProcessImageFileName(void) +@@ -564,7 +560,7 @@ static void test_GetProcessImageFileName(void) { /* Windows returns 2*strlen-1 */ ok(ret >= strlen(szImgPath), "szImgPath=\"%s\" ret=%d\n", szImgPath, ret); diff --git a/patches/ntdll-NtQueryVirtualMemory/0010-ntdll-Skip-get_dll_info-wineserver-call-if-address-d.patch b/patches/ntdll-NtQueryVirtualMemory/0010-ntdll-Skip-get_dll_info-wineserver-call-if-address-d.patch deleted file mode 100644 index 428f205f..00000000 --- a/patches/ntdll-NtQueryVirtualMemory/0010-ntdll-Skip-get_dll_info-wineserver-call-if-address-d.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 9b91067e59331f33825d0a5bc3e1f86f67714830 Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Sun, 28 May 2017 16:14:03 +0200 -Subject: ntdll: Skip get_dll_info wineserver call if address does not have - SEC_IMAGE permissions. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -As suggested by Michael Müller. ---- - dlls/ntdll/virtual.c | 19 +++++++++++++++---- - 1 file changed, 15 insertions(+), 4 deletions(-) - -diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c -index a5c3ce69185..0d5150aaf93 100644 ---- a/dlls/ntdll/virtual.c -+++ b/dlls/ntdll/virtual.c -@@ -2271,10 +2271,18 @@ NTSTATUS virtual_get_section_mapping( HANDLE process, LPCVOID addr, HANDLE *mapp - base = ROUND_ADDR( addr, page_mask ); - - server_enter_uninterrupted_section( &csVirtual, &sigset ); -- if ((view = VIRTUAL_FindView( base, 0 )) && view->mapping) -+ if ((view = VIRTUAL_FindView( base, 0 ))) - { -- status = NtDuplicateObject( NtCurrentProcess(), view->mapping, NtCurrentProcess(), -- mapping, 0, 0, DUP_HANDLE_SAME_ACCESS ); -+ if (view->mapping) -+ { -+ status = NtDuplicateObject( NtCurrentProcess(), view->mapping, NtCurrentProcess(), -+ mapping, 0, 0, DUP_HANDLE_SAME_ACCESS ); -+ } -+ else if (view->protect & SEC_IMAGE) -+ { -+ *mapping = NULL; -+ status = STATUS_SUCCESS; -+ } - } - server_leave_uninterrupted_section( &csVirtual, &sigset ); - return status; -@@ -2424,7 +2432,10 @@ static NTSTATUS get_section_name( HANDLE process, LPCVOID addr, - - if (!addr || !info || !res_len) return STATUS_INVALID_PARAMETER; - -- if (!(status = virtual_get_section_mapping( process, addr, &mapping ))) -+ if ((status = virtual_get_section_mapping( process, addr, &mapping ))) -+ return status; -+ -+ if (mapping) - { - status = server_get_unix_name( mapping, &unix_name ); - close_handle( mapping ); --- -2.12.2 - diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 8e1cd3cb..75b9768b 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "44cb0afb2571984bda8ca1fa084a50c1fc04ac71" + echo "c91a531957acaf4cf7cdb985b5ba47a273f5f9b2" } # Show version information @@ -6595,9 +6595,8 @@ fi # | * [#23999] Implement MemorySectionName class in NtQueryVirtualMemory # | # | Modified files: -# | * dlls/kernel32/virtual.c, dlls/ntdll/directory.c, dlls/ntdll/loader.c, dlls/ntdll/ntdll_misc.h, dlls/ntdll/server.c, -# | dlls/ntdll/tests/info.c, dlls/ntdll/virtual.c, dlls/psapi/tests/psapi_main.c, server/process.c, server/protocol.def, -# | server/thread.c +# | * dlls/kernel32/virtual.c, dlls/ntdll/directory.c, dlls/ntdll/loader.c, dlls/ntdll/ntdll_misc.h, dlls/ntdll/tests/info.c, +# | dlls/ntdll/virtual.c, dlls/psapi/tests/psapi_main.c, server/mapping.c, server/process.c, server/protocol.def # | if test "$enable_ntdll_NtQueryVirtualMemory" -eq 1; then patch_apply ntdll-NtQueryVirtualMemory/0001-server-Store-full-path-for-ntdll-kernel32-dll.patch @@ -6609,7 +6608,6 @@ if test "$enable_ntdll_NtQueryVirtualMemory" -eq 1; then patch_apply ntdll-NtQueryVirtualMemory/0007-kernel32-Implement-K32GetMappedFileName.-v2.patch patch_apply ntdll-NtQueryVirtualMemory/0008-ntdll-Resolve-drive-symlinks-before-returning-sectio.patch patch_apply ntdll-NtQueryVirtualMemory/0009-ntdll-Fix-error-code-when-querying-too-large-memory-.patch - patch_apply ntdll-NtQueryVirtualMemory/0010-ntdll-Skip-get_dll_info-wineserver-call-if-address-d.patch ( printf '%s\n' '+ { "Sebastian Lackner", "server: Store full path for ntdll/kernel32 dll.", 1 },'; printf '%s\n' '+ { "Dmitry Timoshkov", "ntdll: Split logic for MemoryBasicInformation into a separate function.", 1 },'; @@ -6620,7 +6618,6 @@ if test "$enable_ntdll_NtQueryVirtualMemory" -eq 1; then printf '%s\n' '+ { "Dmitry Timoshkov", "kernel32: Implement K32GetMappedFileName.", 2 },'; printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Resolve drive symlinks before returning section name.", 1 },'; printf '%s\n' '+ { "Michael Müller", "ntdll: Fix error code when querying too large memory address.", 1 },'; - printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Skip get_dll_info wineserver call if address does not have SEC_IMAGE permissions.", 1 },'; ) >> "$patchlist" fi 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 8e81d0bf..caec676f 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 0d08cd53ad5041a9ed09bfcc558719306c022f4c Mon Sep 17 00:00:00 2001 +From 438997175c34fbc9e1e146bdecb36f104d80e98e 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 | 1 + + server/mapping.c | 2 ++ server/mutex.c | 1 + server/named_pipe.c | 4 ++++ server/object.c | 4 ++++ @@ -39,10 +39,10 @@ Signed-off-by: Sebastian Lackner server/timer.c | 1 + server/token.c | 1 + server/winstation.c | 2 ++ - 34 files changed, 73 insertions(+), 3 deletions(-) + 34 files changed, 74 insertions(+), 3 deletions(-) diff --git a/server/async.c b/server/async.c -index 020580728de..cfda29ec8c0 100644 +index cf7a434ebca..9c7b9943975 100644 --- a/server/async.c +++ b/server/async.c @@ -78,6 +78,7 @@ static const struct object_ops async_ops = @@ -53,7 +53,7 @@ index 020580728de..cfda29ec8c0 100644 no_close_handle, /* close_handle */ async_destroy /* destroy */ }; -@@ -452,6 +453,7 @@ static const struct object_ops iosb_ops = +@@ -459,6 +460,7 @@ static const struct object_ops iosb_ops = no_link_name, /* link_name */ NULL, /* unlink_name */ no_open_file, /* open_file */ @@ -138,7 +138,7 @@ index 5b69e769a61..832f0d4af34 100644 screen_buffer_destroy /* destroy */ }; diff --git a/server/debugger.c b/server/debugger.c -index 2eb794aaf25..a2c07ba95c3 100644 +index 37f19347bb6..4d4f0035c2f 100644 --- a/server/debugger.c +++ b/server/debugger.c @@ -84,6 +84,7 @@ static const struct object_ops debug_event_ops = @@ -270,7 +270,7 @@ index 9322e2c1c15..721432a4ff3 100644 no_destroy /* destroy */ }; diff --git a/server/file.c b/server/file.c -index 3809012dc8f..e2826c73725 100644 +index 39c8150cb28..418732c743d 100644 --- a/server/file.c +++ b/server/file.c @@ -95,6 +95,7 @@ static const struct object_ops file_ops = @@ -367,10 +367,18 @@ index d7affa514bf..671c969b9a5 100644 mailslot_device_destroy /* destroy */ }; diff --git a/server/mapping.c b/server/mapping.c -index f03ea7a6f63..a465bf5f2dd 100644 +index b2d334c7889..f255ce18556 100644 --- a/server/mapping.c +++ b/server/mapping.c -@@ -94,6 +94,7 @@ static const struct object_ops mapping_ops = +@@ -77,6 +77,7 @@ static const struct object_ops ranges_ops = + no_link_name, /* link_name */ + NULL, /* unlink_name */ + no_open_file, /* open_file */ ++ no_alloc_handle, /* alloc_handle */ + no_close_handle, /* close_handle */ + ranges_destroy /* destroy */ + }; +@@ -131,6 +132,7 @@ static const struct object_ops mapping_ops = directory_link_name, /* link_name */ default_unlink_name, /* unlink_name */ no_open_file, /* open_file */ @@ -391,7 +399,7 @@ index d1887e4bc45..a2a0a24bdc3 100644 mutex_destroy /* destroy */ }; diff --git a/server/named_pipe.c b/server/named_pipe.c -index 80363cb971a..abacf0a4b76 100644 +index 9cd424fe368..629814a6703 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -148,6 +148,7 @@ static const struct object_ops named_pipe_ops = @@ -466,7 +474,7 @@ index b5c50e1cee8..72ad8528c5a 100644 extern void no_destroy( struct object *obj ); #ifdef DEBUG_OBJECTS diff --git a/server/process.c b/server/process.c -index 2327a2664b3..22406d109f8 100644 +index f8739d00b64..c269b50c313 100644 --- a/server/process.c +++ b/server/process.c @@ -84,6 +84,7 @@ static const struct object_ops process_ops = @@ -618,7 +626,7 @@ index 9199bc559d7..ecc0e4300c4 100644 symlink_destroy /* destroy */ }; diff --git a/server/thread.c b/server/thread.c -index 70f5f28739e..5b0b6377e85 100644 +index 2c864a607d0..a641509d601 100644 --- a/server/thread.c +++ b/server/thread.c @@ -120,6 +120,7 @@ static const struct object_ops thread_apc_ops = @@ -682,5 +690,5 @@ index a0be0586523..5f96be8e13f 100644 desktop_destroy /* destroy */ }; -- -2.13.1 +2.14.1 diff --git a/patches/shell32-SFGAO_HASSUBFOLDER/0001-shell32-Set-SFGAO_HASSUBFOLDER-correctly-for-unixfs.patch b/patches/shell32-SFGAO_HASSUBFOLDER/0001-shell32-Set-SFGAO_HASSUBFOLDER-correctly-for-unixfs.patch index 258d1797..968f63b5 100644 --- a/patches/shell32-SFGAO_HASSUBFOLDER/0001-shell32-Set-SFGAO_HASSUBFOLDER-correctly-for-unixfs.patch +++ b/patches/shell32-SFGAO_HASSUBFOLDER/0001-shell32-Set-SFGAO_HASSUBFOLDER-correctly-for-unixfs.patch @@ -1,4 +1,4 @@ -From e86e14d9db9067fa0312470ac1c8363171e57837 Mon Sep 17 00:00:00 2001 +From f4ffa65bb956b052aa50faa9d7854b67ced4ef0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sat, 15 Aug 2015 21:09:22 +0200 Subject: shell32: Set SFGAO_HASSUBFOLDER correctly for unixfs. @@ -8,11 +8,11 @@ Subject: shell32: Set SFGAO_HASSUBFOLDER correctly for unixfs. 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c -index be1ba81..481ee06 100644 +index e74e4dbf55a..a57bc68a408 100644 --- a/dlls/shell32/shfldr_unixfs.c +++ b/dlls/shell32/shfldr_unixfs.c @@ -1143,8 +1143,10 @@ static HRESULT WINAPI ShellFolder2_GetAttributesOf(IShellFolder2* iface, UINT ci - SFGAO_HASPROPSHEET | SFGAO_DROPTARGET | SFGAO_FILESYSTEM; + SFGAO_HASPROPSHEET | SFGAO_DROPTARGET | SFGAO_FILESYSTEM | SFGAO_LINK; lstrcpyA(szAbsolutePath, This->m_pszPath); pszRelativePath = szAbsolutePath + lstrlenA(szAbsolutePath); - for (i=0; i