From d269579b4b3f2105d2b0b36838e0937608ac6510 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Tue, 6 Dec 2022 11:42:36 +1100 Subject: [PATCH] Rebase against 6b816b8969576a931af25fe5cc32326f03bb7359. --- ...t-HashLinks-field-in-LDR-module-data.patch | 26 +++++++++---------- ...t-for-hiding-wine-version-informatio.patch | 24 ++++++++--------- patches/patchinstall.sh | 2 +- ...02-shell32-Add-security-property-tab.patch | 8 +++--- staging/upstream-commit | 2 +- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch b/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch index 358f80d8..4f4ed7a6 100644 --- a/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch +++ b/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch @@ -1,4 +1,4 @@ -From f44bf16013c0dace490308af9ce17b3ff6082abf Mon Sep 17 00:00:00 2001 +From 3bde485a0dfb5626b079eec3a92cedcbcafa5d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Mon, 3 Apr 2017 05:30:27 +0200 Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data. @@ -9,7 +9,7 @@ Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data. 2 files changed, 117 insertions(+) diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c -index 4f1b11338a6..56cd5a88e20 100644 +index 365f4465fc7..aca2b0f24cb 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -30,6 +30,7 @@ @@ -20,7 +20,7 @@ index 4f1b11338a6..56cd5a88e20 100644 #include "wine/test.h" #include "delayloadhandler.h" -@@ -4036,6 +4037,79 @@ static void test_Wow64Transition(void) +@@ -4056,6 +4057,79 @@ static void test_Wow64Transition(void) debugstr_wn(name->SectionFileName.Buffer, name->SectionFileName.Length / sizeof(WCHAR))); } @@ -100,7 +100,7 @@ index 4f1b11338a6..56cd5a88e20 100644 START_TEST(loader) { int argc; -@@ -4108,6 +4182,7 @@ START_TEST(loader) +@@ -4128,6 +4202,7 @@ START_TEST(loader) test_InMemoryOrderModuleList(); test_LoadPackagedLibrary(); test_wow64_redirection(); @@ -109,7 +109,7 @@ index 4f1b11338a6..56cd5a88e20 100644 test_dll_file( "kernel32.dll" ); test_dll_file( "advapi32.dll" ); diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 6dcf73295b0..8b9305ff5b6 100644 +index b96cb862c93..aade2ab95d4 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -129,6 +129,9 @@ struct file_id @@ -122,7 +122,7 @@ index 6dcf73295b0..8b9305ff5b6 100644 /* internal representation of loaded modules */ typedef struct _wine_modref { -@@ -476,6 +479,33 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module ) +@@ -498,6 +501,33 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module ) } } @@ -156,7 +156,7 @@ index 6dcf73295b0..8b9305ff5b6 100644 /************************************************************************* * get_modref * -@@ -1352,7 +1382,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name +@@ -1471,7 +1501,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name &wm->ldr.InLoadOrderLinks); InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderLinks); @@ -169,7 +169,7 @@ index 6dcf73295b0..8b9305ff5b6 100644 if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT)) { -@@ -2032,6 +2067,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name, +@@ -2149,6 +2184,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name, /* the module has only be inserted in the load & memory order lists */ RemoveEntryList(&wm->ldr.InLoadOrderLinks); RemoveEntryList(&wm->ldr.InMemoryOrderLinks); @@ -177,7 +177,7 @@ index 6dcf73295b0..8b9305ff5b6 100644 /* FIXME: there are several more dangling references * left. Including dlls loaded by this dll before the -@@ -3621,6 +3657,7 @@ static void free_modref( WINE_MODREF *wm ) +@@ -3747,6 +3783,7 @@ static void free_modref( WINE_MODREF *wm ) RemoveEntryList(&wm->ldr.InLoadOrderLinks); RemoveEntryList(&wm->ldr.InMemoryOrderLinks); @@ -185,15 +185,15 @@ index 6dcf73295b0..8b9305ff5b6 100644 if (wm->ldr.InInitializationOrderLinks.Flink) RemoveEntryList(&wm->ldr.InInitializationOrderLinks); -@@ -3983,6 +4020,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR - +@@ -4113,6 +4150,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR if (!imports_fixup_done) { + MEMORY_BASIC_INFORMATION meminfo; + int i; ANSI_STRING func_name; WINE_MODREF *kernel32; PEB *peb = NtCurrentTeb()->Peb; -@@ -4000,6 +4038,10 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR +@@ -4134,6 +4172,10 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR sizeof(peb->TlsExpansionBitmapBits) * 8 ); RtlSetBits( peb->TlsBitmap, 0, 1 ); /* TLS index 0 is reserved and should be initialized to NULL. */ @@ -205,5 +205,5 @@ index 6dcf73295b0..8b9305ff5b6 100644 load_global_options(); version_init(); -- -2.33.0 +2.38.1 diff --git a/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch b/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch index 09287e3b..e42ab5d1 100644 --- a/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch +++ b/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch @@ -1,4 +1,4 @@ -From 0e69c40a24de97bb97f3a0e94f39cff07326ebe7 Mon Sep 17 00:00:00 2001 +From 9abcf9173358a37b01ea189f80f841af35307922 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 30 May 2015 02:23:15 +0200 Subject: [PATCH] ntdll: Add support for hiding wine version information from @@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Add support for hiding wine version information from 2 files changed, 103 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 2e118a55490..c16c3fd01a1 100644 +index 8e2b3282a75..5cb6b48e7ae 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -87,6 +87,9 @@ const WCHAR system_dir[] = L"C:\\windows\\system32\\"; +@@ -88,6 +88,9 @@ const WCHAR system_dir[] = L"C:\\windows\\system32\\"; /* system search path */ static const WCHAR system_path[] = L"C:\\windows\\system32;C:\\windows\\system;C:\\windows"; @@ -23,7 +23,7 @@ index 2e118a55490..c16c3fd01a1 100644 static BOOL is_prefix_bootstrap; /* are we bootstrapping the prefix? */ static BOOL imports_fixup_done = FALSE; /* set once the imports have been fixed up, before attaching them */ static BOOL process_detaching = FALSE; /* set on process detach to avoid deadlocks with thread detach */ -@@ -106,6 +109,8 @@ struct dll_dir_entry +@@ -107,6 +110,8 @@ struct dll_dir_entry static struct list dll_dir_list = LIST_INIT( dll_dir_list ); /* extra dirs from LdrAddDllDirectory */ @@ -32,7 +32,7 @@ index 2e118a55490..c16c3fd01a1 100644 struct ldr_notification { struct list entry; -@@ -1980,6 +1985,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic ) +@@ -1978,6 +1983,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic ) } @@ -129,7 +129,7 @@ index 2e118a55490..c16c3fd01a1 100644 /****************************************************************** * LdrGetProcedureAddress (NTDLL.@) */ -@@ -1999,7 +2094,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name, +@@ -1997,7 +2092,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name, { void *proc = name ? find_named_export( module, exports, exp_size, name->Buffer, -1, NULL ) : find_ordinal_export( module, exports, exp_size, ord - exports->Base, NULL ); @@ -138,20 +138,20 @@ index 2e118a55490..c16c3fd01a1 100644 { *address = proc; ret = STATUS_SUCCESS; -@@ -2242,6 +2337,8 @@ static void build_ntdll_module(void) - if (TRACE_ON(relay)) RELAY_SetupDLL( meminfo.AllocationBase ); - NtQueryVirtualMemory( GetCurrentProcess(), meminfo.AllocationBase, MemoryWineUnixFuncs, - &ntdll_unix_handle, sizeof(ntdll_unix_handle), NULL ); +@@ -2235,6 +2330,8 @@ static void build_ntdll_module( HMODULE module ) + wm->ldr.Flags &= ~LDR_DONT_RESOLVE_REFS; + node_ntdll = wm->ldr.DdagNode; + if (TRACE_ON(relay)) RELAY_SetupDLL( module ); + + hidden_exports_init( wm->ldr.FullDllName.Buffer ); } diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index 99b563ca07c..5a201f5221c 100644 +index 8801c518039..78ff79625ea 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -152,6 +152,11 @@ static inline TEB64 *NtCurrentTeb64(void) { return (TEB64 *)NtCurrentTeb()->GdiB +@@ -153,6 +153,11 @@ static inline TEB64 *NtCurrentTeb64(void) { return (TEB64 *)NtCurrentTeb()->GdiB NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*); diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index c5ab1197..de086623 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "0fe562b4ae3f66f9c0e29ab8f27a4abf2ac78501" + echo "6b816b8969576a931af25fe5cc32326f03bb7359" } # Show version information diff --git a/patches/shell32-ACE_Viewer/0002-shell32-Add-security-property-tab.patch b/patches/shell32-ACE_Viewer/0002-shell32-Add-security-property-tab.patch index 03bb15f1..f72b8627 100644 --- a/patches/shell32-ACE_Viewer/0002-shell32-Add-security-property-tab.patch +++ b/patches/shell32-ACE_Viewer/0002-shell32-Add-security-property-tab.patch @@ -1,4 +1,4 @@ -From 5d9bbd0a9af79752f777975a53837af52b5539cf Mon Sep 17 00:00:00 2001 +From e62cf6e3f75669dd83486af4c8c826d4221a5f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Mon, 8 May 2017 23:33:45 +0200 Subject: [PATCH] shell32: Add security property tab. @@ -11,7 +11,7 @@ Subject: [PATCH] shell32: Add security property tab. 4 files changed, 438 insertions(+), 1 deletion(-) diff --git a/dlls/shell32/Makefile.in b/dlls/shell32/Makefile.in -index 9e2395126fc..f233acca65a 100644 +index 13af5aa0dfc..e743bed9ca2 100644 --- a/dlls/shell32/Makefile.in +++ b/dlls/shell32/Makefile.in @@ -1,6 +1,6 @@ @@ -19,7 +19,7 @@ index 9e2395126fc..f233acca65a 100644 IMPORTLIB = shell32 -IMPORTS = uuid shlwapi user32 gdi32 advapi32 +IMPORTS = uuid shlwapi user32 gdi32 advapi32 aclui - DELAYIMPORTS = ole32 oleaut32 shdocvw version comctl32 gdiplus + DELAYIMPORTS = ole32 oleaut32 shdocvw version comctl32 comdlg32 gdiplus C_SRCS = \ diff --git a/dlls/shell32/shell32.rc b/dlls/shell32/shell32.rc @@ -515,5 +515,5 @@ index 210046e729d..0f3a64f16d2 100644 #define IDS_RECYCLEBIN_FOLDER_NAME 8964 -- -2.34.1 +2.38.1 diff --git a/staging/upstream-commit b/staging/upstream-commit index 61338942..09bec2ab 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -0fe562b4ae3f66f9c0e29ab8f27a4abf2ac78501 +6b816b8969576a931af25fe5cc32326f03bb7359