diff --git a/patches/kernel32-GetShortPathName/0001-kernel32-tests-Add-some-tests-for-GetLongPathName-Ge.patch b/patches/kernel32-GetShortPathName/0001-kernel32-tests-Add-some-tests-for-GetLongPathName-Ge.patch index 9a7f0b7c..430bd63b 100644 --- a/patches/kernel32-GetShortPathName/0001-kernel32-tests-Add-some-tests-for-GetLongPathName-Ge.patch +++ b/patches/kernel32-GetShortPathName/0001-kernel32-tests-Add-some-tests-for-GetLongPathName-Ge.patch @@ -1,18 +1,18 @@ -From 8f0f5577096155171dceb98ee28c570533a9a89c Mon Sep 17 00:00:00 2001 +From a539993bd7c60424fb6d592be8cb5040959e1b48 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Sun, 17 Apr 2016 19:58:15 +0800 -Subject: kernel32/tests: Add some tests for GetLongPathName/GetShortPathName - called with a wildcard. +Subject: [PATCH] kernel32/tests: Add some tests for + GetLongPathName/GetShortPathName called with a wildcard. --- dlls/kernel32/tests/path.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c -index 079820f..0dc8802 100644 +index ca1cbf3..1e698bf 100644 --- a/dlls/kernel32/tests/path.c +++ b/dlls/kernel32/tests/path.c -@@ -1170,7 +1170,7 @@ static void test_GetTempPath(void) +@@ -1186,7 +1186,7 @@ static void test_GetTempPath(void) static void test_GetLongPathNameA(void) { DWORD length, explength, hostsize; @@ -21,7 +21,7 @@ index 079820f..0dc8802 100644 char longpath[MAX_PATH]; char unc_prefix[MAX_PATH]; char unc_short[MAX_PATH], unc_long[MAX_PATH]; -@@ -1181,7 +1181,17 @@ static void test_GetLongPathNameA(void) +@@ -1197,7 +1197,17 @@ static void test_GetLongPathNameA(void) return; GetTempPathA(MAX_PATH, tempfile); @@ -40,7 +40,7 @@ index 079820f..0dc8802 100644 file = CreateFileA(tempfile, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); CloseHandle(file); -@@ -1385,6 +1395,7 @@ static void test_GetShortPathNameW(void) +@@ -1401,6 +1411,7 @@ static void test_GetShortPathNameW(void) static const WCHAR name[] = { 't', 'e', 's', 't', 0 }; static const WCHAR backSlash[] = { '\\', 0 }; static const WCHAR a_bcdeW[] = {'a','.','b','c','d','e',0}; @@ -48,8 +48,8 @@ index 079820f..0dc8802 100644 WCHAR path[MAX_PATH], tmppath[MAX_PATH], *ptr; WCHAR short_path[MAX_PATH]; DWORD length; -@@ -1447,6 +1458,15 @@ static void test_GetShortPathNameW(void) - length = GetShortPathNameW( path, short_path, sizeof(short_path)/sizeof(*short_path) ); +@@ -1463,6 +1474,15 @@ static void test_GetShortPathNameW(void) + length = GetShortPathNameW( path, short_path, ARRAY_SIZE( short_path )); ok( length, "GetShortPathNameW failed: %u.\n", GetLastError() ); + lstrcpyW(ptr, wildW); @@ -65,5 +65,5 @@ index 079820f..0dc8802 100644 ok( ret, "Cannot delete file.\n" ); *ptr = 0; -- -2.7.1 +1.9.1 diff --git a/patches/kernel32-Profile/0001-kernel32-Allow-empty-profile-section-and-key-name-st.patch b/patches/kernel32-Profile/0001-kernel32-Allow-empty-profile-section-and-key-name-st.patch index 0c06c4ed..e4d2c5e8 100644 --- a/patches/kernel32-Profile/0001-kernel32-Allow-empty-profile-section-and-key-name-st.patch +++ b/patches/kernel32-Profile/0001-kernel32-Allow-empty-profile-section-and-key-name-st.patch @@ -1,7 +1,7 @@ -From fbe441532820151b6fbb6462378cf2465303cf80 Mon Sep 17 00:00:00 2001 +From bbcdf76bf8fd3786856b2c9afebe2a6b3974a037 Mon Sep 17 00:00:00 2001 From: Claudio Fontana Date: Sat, 29 Nov 2014 22:06:20 +0100 -Subject: kernel32: Allow empty profile section and key name strings. +Subject: [PATCH] kernel32: Allow empty profile section and key name strings. Consider "" a normal section, and fix calculation for zero length section name string and key name string. @@ -15,7 +15,7 @@ Changes by Sebastian Lackner : 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c -index a9a11b1..fb35c90 100644 +index 0974aaf..f0c65f1 100644 --- a/dlls/kernel32/profile.c +++ b/dlls/kernel32/profile.c @@ -500,7 +500,7 @@ static BOOL PROFILE_DeleteSection( PROFILESECTION **section, LPCWSTR name ) @@ -119,13 +119,13 @@ index a9a11b1..fb35c90 100644 INT ret = PROFILE_GetSection(CurProfile->section, section, buffer, len, FALSE); if (!buffer[0]) /* no luck -> def_val */ diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c -index 2eb90a8..990aa14 100644 +index 4dbe129..e443b25 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c -@@ -154,9 +154,7 @@ static void test_profile_string(void) +@@ -153,9 +153,7 @@ static void test_profile_string(void) + /* works only in unicode, ascii crashes */ - ret=GetPrivateProfileStringW(sW, emptyW, emptyW, bufW, - sizeof(bufW)/sizeof(bufW[0]), TESTFILE2W); + ret=GetPrivateProfileStringW(sW, emptyW, emptyW, bufW, ARRAY_SIZE(bufW), TESTFILE2W); - todo_wine ok(ret == 10, "expected 10, got %u\n", ret); - todo_wine @@ -133,5 +133,5 @@ index 2eb90a8..990aa14 100644 wine_dbgstr_w(valnokeyW), wine_dbgstr_w(bufW) ); -- -2.1.3 +1.9.1 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 bb820397..46d06563 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 225b86d4fb6f51854f173076564f6bea9a9e5ac0 Mon Sep 17 00:00:00 2001 +From 8ebb22fe5f693288dd36dca0aa911164385b6e77 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. @@ -10,7 +10,7 @@ Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data. 3 files changed, 144 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c -index ac62d28..0f5ddf1 100644 +index 037c01e..369d48b 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -29,6 +29,7 @@ @@ -108,10 +108,10 @@ index ac62d28..0f5ddf1 100644 + test_HashLinks(); } diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 06915aa..722ab44 100644 +index c24fa95..246bc0b 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -86,6 +86,9 @@ static const char * const reason_names[] = +@@ -96,6 +96,9 @@ static const char * const reason_names[] = static const WCHAR dllW[] = {'.','d','l','l',0}; @@ -121,8 +121,8 @@ index 06915aa..722ab44 100644 /* internal representation of 32bit modules. per process. */ typedef struct _wine_modref { -@@ -349,6 +352,52 @@ static inline ULONG_PTR allocate_stub( const char *dll, const char *name ) { ret - +@@ -382,6 +385,52 @@ static void call_ldr_notifications( ULONG reason, LDR_MODULE *module ) + } /************************************************************************* + * hash_basename @@ -174,7 +174,7 @@ index 06915aa..722ab44 100644 * get_modref * * Looks for the referenced HMODULE in the current process -@@ -1067,7 +1116,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, LPCWSTR filename, LPCWSTR fak +@@ -1100,7 +1149,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, LPCWSTR filename, LPCWSTR fak &wm->ldr.InLoadOrderModuleList); InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderModuleList); @@ -187,7 +187,7 @@ index 06915aa..722ab44 100644 if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT)) { -@@ -1795,6 +1849,7 @@ static void load_builtin_callback( void *module, const char *filename ) +@@ -1864,6 +1918,7 @@ static void load_builtin_callback( void *module, const char *filename ) /* the module has only be inserted in the load & memory order lists */ RemoveEntryList(&wm->ldr.InLoadOrderModuleList); RemoveEntryList(&wm->ldr.InMemoryOrderModuleList); @@ -195,7 +195,7 @@ index 06915aa..722ab44 100644 /* FIXME: free the modref */ builtin_load_info->status = STATUS_DLL_NOT_FOUND; return; -@@ -2055,6 +2110,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, LPCWSTR fakemo +@@ -2124,6 +2179,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, LPCWSTR fakemo /* the module has only be inserted in the load & memory order lists */ RemoveEntryList(&wm->ldr.InLoadOrderModuleList); RemoveEntryList(&wm->ldr.InMemoryOrderModuleList); @@ -203,7 +203,7 @@ index 06915aa..722ab44 100644 /* FIXME: there are several more dangling references * left. Including dlls loaded by this dll before the -@@ -3230,6 +3286,7 @@ static void free_modref( WINE_MODREF *wm ) +@@ -3299,6 +3355,7 @@ static void free_modref( WINE_MODREF *wm ) { RemoveEntryList(&wm->ldr.InLoadOrderModuleList); RemoveEntryList(&wm->ldr.InMemoryOrderModuleList); @@ -211,7 +211,7 @@ index 06915aa..722ab44 100644 if (wm->ldr.InInitializationOrderModuleList.Flink) RemoveEntryList(&wm->ldr.InInitializationOrderModuleList); -@@ -3627,6 +3684,9 @@ void WINAPI LdrInitializeThunk( void *kernel_start, ULONG_PTR unknown2, +@@ -3696,6 +3753,9 @@ void WINAPI LdrInitializeThunk( void *kernel_start, ULONG_PTR unknown2, RemoveEntryList( &wm->ldr.InMemoryOrderModuleList ); InsertHeadList( &peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderModuleList ); @@ -221,7 +221,7 @@ index 06915aa..722ab44 100644 if ((status = virtual_alloc_thread_stack( NtCurrentTeb(), 0, 0, NULL )) != STATUS_SUCCESS) { ERR( "Main exe initialization for %s failed, status %x\n", -@@ -3773,6 +3833,7 @@ void __wine_process_init(void) +@@ -3842,6 +3902,7 @@ void __wine_process_init(void) NTSTATUS status; ANSI_STRING func_name; void (* DECLSPEC_NORETURN CDECL init_func)(void); @@ -229,7 +229,7 @@ index 06915aa..722ab44 100644 main_exe_file = thread_init(); -@@ -3782,6 +3843,10 @@ void __wine_process_init(void) +@@ -3851,6 +3912,10 @@ void __wine_process_init(void) load_global_options(); @@ -241,10 +241,10 @@ index 06915aa..722ab44 100644 wine_dll_set_callback( load_builtin_callback ); diff --git a/include/winternl.h b/include/winternl.h -index 3659db1..bd6a8af 100644 +index 558f643..737e7f1 100644 --- a/include/winternl.h +++ b/include/winternl.h -@@ -2164,8 +2164,7 @@ typedef struct _LDR_MODULE +@@ -2171,8 +2171,7 @@ typedef struct _LDR_MODULE ULONG Flags; SHORT LoadCount; SHORT TlsIndex; @@ -254,7 +254,7 @@ index 3659db1..bd6a8af 100644 ULONG TimeDateStamp; HANDLE ActivationContext; PVOID PatchInformation; -@@ -2175,6 +2174,9 @@ typedef struct _LDR_MODULE +@@ -2182,6 +2181,9 @@ typedef struct _LDR_MODULE PVOID ContextInformation; ULONG_PTR OriginalBase; LARGE_INTEGER LoadTime; 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 46511b75..9953cf3b 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 2d479408e3fb2670cb0d30ab912f88aa627c687f Mon Sep 17 00:00:00 2001 +From c2794d82d31322d361e3545e54789fee28119d40 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, 100 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 51aa334..1a69606 100644 +index 58c02c9..04bae4b 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -67,9 +67,12 @@ typedef void (CALLBACK *LDRENUMPROC)(LDR_MODULE *, void *, BOOLEAN *); +@@ -68,9 +68,12 @@ typedef void (CALLBACK *LDRENUMPROC)(LDR_MODULE *, void *, BOOLEAN *); const WCHAR system_dir[] = {'C',':','\\','w','i','n','d','o','w','s','\\', 's','y','s','t','e','m','3','2','\\',0}; @@ -24,9 +24,9 @@ index 51aa334..1a69606 100644 static int free_lib_count; /* recursion depth of LdrUnloadDll calls */ +static BOOL hide_wine_exports = FALSE; /* try to hide ntdll wine exports from applications */ - static const char * const reason_names[] = + struct ldr_notification { -@@ -1477,6 +1480,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic ) +@@ -1598,6 +1601,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic ) } @@ -123,7 +123,7 @@ index 51aa334..1a69606 100644 /****************************************************************** * LdrGetProcedureAddress (NTDLL.@) */ -@@ -1497,7 +1590,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name, +@@ -1618,7 +1711,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name, LPCWSTR load_path = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer; void *proc = name ? find_named_export( module, exports, exp_size, name->Buffer, -1, load_path ) : find_ordinal_export( module, exports, exp_size, ord - exports->Base, load_path ); @@ -132,7 +132,7 @@ index 51aa334..1a69606 100644 { *address = proc; ret = STATUS_SUCCESS; -@@ -3182,6 +3275,7 @@ void WINAPI LdrInitializeThunk( void *kernel_start, ULONG_PTR unknown2, +@@ -3374,6 +3467,7 @@ void WINAPI LdrInitializeThunk( void *kernel_start, ULONG_PTR unknown2, if (!peb->ProcessParameters->WindowTitle.Buffer) peb->ProcessParameters->WindowTitle = wm->ldr.FullDllName; version_init( wm->ldr.FullDllName.Buffer ); @@ -141,10 +141,10 @@ index 51aa334..1a69606 100644 LdrQueryImageFileExecutionOptions( &peb->ProcessParameters->ImagePathName, globalflagW, diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index 717e47d..3007755 100644 +index d0fc81b..c09f25c 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -251,6 +251,11 @@ extern HANDLE keyed_event DECLSPEC_HIDDEN; +@@ -254,6 +254,11 @@ extern HANDLE keyed_event DECLSPEC_HIDDEN; NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*); @@ -157,5 +157,5 @@ index 717e47d..3007755 100644 extern BOOL read_process_time(int unix_pid, int unix_tid, unsigned long clk_tck, LARGE_INTEGER *kernel, LARGE_INTEGER *user) DECLSPEC_HIDDEN; -- -2.7.4 +1.9.1 diff --git a/patches/ntdll-LdrRegisterDllNotification/0001-ntdll-Implement-LdrRegisterDllNotification-and-LdrUn.patch b/patches/ntdll-LdrRegisterDllNotification/0001-ntdll-Implement-LdrRegisterDllNotification-and-LdrUn.patch deleted file mode 100644 index fdc090a1..00000000 --- a/patches/ntdll-LdrRegisterDllNotification/0001-ntdll-Implement-LdrRegisterDllNotification-and-LdrUn.patch +++ /dev/null @@ -1,450 +0,0 @@ -From 1a105dee7bff64ffe5280b29e4274c0d375cacf9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Sat, 22 Jul 2017 03:56:26 +0200 -Subject: [PATCH] ntdll: Implement LdrRegisterDllNotification and - LdrUnregisterDllNotification. - ---- - dlls/ntdll/loader.c | 79 +++++++++++++++- - dlls/ntdll/tests/rtl.c | 250 +++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 325 insertions(+), 4 deletions(-) - -diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index ba3e2df..6495bb3 100644 ---- a/dlls/ntdll/loader.c -+++ b/dlls/ntdll/loader.c -@@ -40,6 +40,7 @@ - #include "wine/library.h" - #include "wine/unicode.h" - #include "wine/debug.h" -+#include "wine/list.h" - #include "wine/server.h" - #include "ntdll_misc.h" - #include "ddk/wdm.h" -@@ -67,6 +68,15 @@ typedef void (CALLBACK *LDRENUMPROC)(LDR_MODULE *, void *, BOOLEAN *); - const WCHAR system_dir[] = {'C',':','\\','w','i','n','d','o','w','s','\\', - 's','y','s','t','e','m','3','2','\\',0}; - -+struct ldr_notification -+{ -+ struct list entry; -+ PLDR_DLL_NOTIFICATION_FUNCTION callback; -+ void *context; -+}; -+ -+static struct list ldr_notifications = LIST_INIT( ldr_notifications ); -+ - #define IS_OPTION_TRUE(ch) ((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1') - - static BOOL imports_fixup_done = FALSE; /* set once the imports have been fixed up, before attaching them */ -@@ -350,6 +360,29 @@ static ULONG_PTR allocate_stub( const char *dll, const char *name ) - static inline ULONG_PTR allocate_stub( const char *dll, const char *name ) { return 0xdeadbeef; } - #endif /* __i386__ */ - -+/* call ldr notifications */ -+static void call_ldr_notifications( ULONG reason, LDR_MODULE *module ) -+{ -+ struct ldr_notification *notify, *notify_next; -+ LDR_DLL_NOTIFICATION_DATA data; -+ -+ data.Loaded.Flags = 0; -+ data.Loaded.FullDllName = &module->FullDllName; -+ data.Loaded.BaseDllName = &module->BaseDllName; -+ data.Loaded.DllBase = module->BaseAddress; -+ data.Loaded.SizeOfImage = module->SizeOfImage; -+ -+ LIST_FOR_EACH_ENTRY_SAFE( notify, notify_next, &ldr_notifications, struct ldr_notification, entry ) -+ { -+ TRACE_(relay)("\1Call LDR notification callback (proc=%p,reason=%u,data=%p,context=%p)\n", -+ notify->callback, reason, &data, notify->context ); -+ -+ notify->callback(reason, &data, notify->context); -+ -+ TRACE_(relay)("\1Ret LDR notification callback (proc=%p,reason=%u,data=%p,context=%p)\n", -+ notify->callback, reason, &data, notify->context ); -+ } -+} - - /************************************************************************* - * hash_basename -@@ -1334,16 +1367,23 @@ static NTSTATUS process_attach( WINE_MODREF *wm, LPVOID lpReserved ) - { - WINE_MODREF *prev = current_modref; - current_modref = wm; -+ -+ call_ldr_notifications( LDR_DLL_NOTIFICATION_REASON_LOADED, &wm->ldr ); - status = MODULE_InitDLL( wm, DLL_PROCESS_ATTACH, lpReserved ); - if (status == STATUS_SUCCESS) -+ { - wm->ldr.Flags |= LDR_PROCESS_ATTACHED; -+ } - else - { - MODULE_InitDLL( wm, DLL_PROCESS_DETACH, lpReserved ); -+ call_ldr_notifications( LDR_DLL_NOTIFICATION_REASON_UNLOADED, &wm->ldr ); -+ - /* point to the name so LdrInitializeThunk can print it */ - last_failed_modref = wm; - WARN("Initialization of %s failed\n", debugstr_w(wm->ldr.BaseDllName.Buffer)); - } -+ - current_modref = prev; - } - -@@ -1412,6 +1452,7 @@ static void process_detach(void) - mod->Flags &= ~LDR_PROCESS_ATTACHED; - MODULE_InitDLL( CONTAINING_RECORD(mod, WINE_MODREF, ldr), - DLL_PROCESS_DETACH, ULongToPtr(process_detaching) ); -+ call_ldr_notifications( LDR_DLL_NOTIFICATION_REASON_UNLOADED, mod ); - - /* Restart at head of WINE_MODREF list, as entries might have - been added and/or removed while performing the call ... */ -@@ -1526,8 +1567,27 @@ NTSTATUS WINAPI LdrEnumerateLoadedModules( void *unknown, LDRENUMPROC callback, - NTSTATUS WINAPI LdrRegisterDllNotification(ULONG flags, PLDR_DLL_NOTIFICATION_FUNCTION callback, - void *context, void **cookie) - { -- FIXME( "(%04x, %p, %p, %p) stub\n", flags, callback, context, cookie ); -- return STATUS_NOT_IMPLEMENTED; -+ struct ldr_notification *notify; -+ -+ TRACE( "(%x, %p, %p, %p)\n", flags, callback, context, cookie ); -+ -+ if (!callback || !cookie) -+ return STATUS_INVALID_PARAMETER; -+ -+ if (flags) -+ FIXME( "ignoring flags %x\n", flags ); -+ -+ notify = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(*notify) ); -+ if (!notify) return STATUS_NO_MEMORY; -+ notify->callback = callback; -+ notify->context = context; -+ -+ RtlEnterCriticalSection( &loader_section ); -+ list_add_tail( &ldr_notifications, ¬ify->entry ); -+ RtlLeaveCriticalSection( &loader_section ); -+ -+ *cookie = notify; -+ return STATUS_SUCCESS; - } - - /****************************************************************** -@@ -1535,8 +1595,18 @@ NTSTATUS WINAPI LdrRegisterDllNotification(ULONG flags, PLDR_DLL_NOTIFICATION_FU - */ - NTSTATUS WINAPI LdrUnregisterDllNotification( void *cookie ) - { -- FIXME( "(%p) stub\n", cookie ); -- return STATUS_NOT_IMPLEMENTED; -+ struct ldr_notification *notify = cookie; -+ -+ TRACE( "(%p)\n", cookie ); -+ -+ if (!notify) return STATUS_INVALID_PARAMETER; -+ -+ RtlEnterCriticalSection( &loader_section ); -+ list_remove( ¬ify->entry ); -+ RtlLeaveCriticalSection( &loader_section ); -+ -+ RtlFreeHeap( GetProcessHeap(), 0, notify ); -+ return STATUS_SUCCESS; - } - - /****************************************************************** -@@ -2141,6 +2211,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, LPCWSTR fakemo - TRACE_(loaddll)( "Loaded %s at %p: native\n", debugstr_w(wm->ldr.FullDllName.Buffer), module ); - - wm->ldr.LoadCount = 1; -+ - *pwm = wm; - return STATUS_SUCCESS; - } -diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c -index 02ae1c1..8358cd5 100644 ---- a/dlls/ntdll/tests/rtl.c -+++ b/dlls/ntdll/tests/rtl.c -@@ -105,6 +105,8 @@ static NTSTATUS (WINAPI *pLdrEnumerateLoadedModules)(void *, void *, void *); - static NTSTATUS (WINAPI *pRtlQueryPackageIdentity)(HANDLE, WCHAR*, SIZE_T*, WCHAR*, SIZE_T*, BOOLEAN*); - static NTSTATUS (WINAPI *pRtlMakeSelfRelativeSD)(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD); - static NTSTATUS (WINAPI *pRtlAbsoluteToSelfRelativeSD)(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PULONG); -+static NTSTATUS (WINAPI *pLdrRegisterDllNotification)(ULONG, PLDR_DLL_NOTIFICATION_FUNCTION, void *, void **); -+static NTSTATUS (WINAPI *pLdrUnregisterDllNotification)(void *); - - static HMODULE hkernel32 = 0; - static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL); -@@ -112,6 +114,9 @@ static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL); - - #define LEN 16 - static const char* src_src = "This is a test!"; /* 16 bytes long, incl NUL */ -+static WCHAR ws2_32dllW[] = {'w','s','2','_','3','2','.','d','l','l',0}; -+static WCHAR wintrustdllW[] = {'w','i','n','t','r','u','s','t','.','d','l','l',0}; -+static WCHAR crypt32dllW[] = {'c','r','y','p','t','3','2','.','d','l','l',0}; - static ULONG src_aligned_block[4]; - static ULONG dest_aligned_block[32]; - static const char *src = (const char*)src_aligned_block; -@@ -162,6 +167,8 @@ static void InitFunctionPtrs(void) - pRtlQueryPackageIdentity = (void *)GetProcAddress(hntdll, "RtlQueryPackageIdentity"); - pRtlMakeSelfRelativeSD = (void *)GetProcAddress(hntdll, "RtlMakeSelfRelativeSD"); - pRtlAbsoluteToSelfRelativeSD = (void *)GetProcAddress(hntdll, "RtlAbsoluteToSelfRelativeSD"); -+ pLdrRegisterDllNotification = (void *)GetProcAddress(hntdll, "LdrRegisterDllNotification"); -+ pLdrUnregisterDllNotification = (void *)GetProcAddress(hntdll, "LdrUnregisterDllNotification"); - } - hkernel32 = LoadLibraryA("kernel32.dll"); - ok(hkernel32 != 0, "LoadLibrary failed\n"); -@@ -2334,6 +2341,248 @@ done: - CoUninitialize(); - } - -+static DWORD (CALLBACK *orig_entry)(HMODULE,DWORD,LPVOID); -+static DWORD *dll_main_data; -+ -+static inline void *get_rva( HMODULE module, DWORD va ) -+{ -+ return (void *)((char *)module + va); -+} -+ -+static void CALLBACK ldr_notify_callback1(ULONG reason, LDR_DLL_NOTIFICATION_DATA *data, void *context) -+{ -+ const IMAGE_IMPORT_DESCRIPTOR *imports; -+ const IMAGE_THUNK_DATA *import_list; -+ IMAGE_THUNK_DATA *thunk_list; -+ DWORD *calls = context; -+ LIST_ENTRY *mark; -+ LDR_MODULE *mod; -+ ULONG size; -+ int i, j; -+ -+ *calls <<= 4; -+ *calls |= reason; -+ -+ ok(data->Loaded.Flags == 0, "Expected flags 0, got %x\n", data->Loaded.Flags); -+ ok(!lstrcmpiW(data->Loaded.BaseDllName->Buffer, ws2_32dllW), "Expected ws2_32.dll, got %s\n", -+ wine_dbgstr_w(data->Loaded.BaseDllName->Buffer)); -+ ok(!!data->Loaded.DllBase, "Expected non zero base address\n"); -+ ok(data->Loaded.SizeOfImage, "Expected non zero image size\n"); -+ -+ /* expect module to be last module listed in LdrData load order list */ -+ mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList; -+ mod = CONTAINING_RECORD(mark->Blink, LDR_MODULE, InMemoryOrderModuleList); -+ ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n", -+ data->Loaded.DllBase, mod->BaseAddress); -+ ok(!lstrcmpiW(mod->BaseDllName.Buffer, ws2_32dllW), "Expected ws2_32.dll, got %s\n", -+ wine_dbgstr_w(mod->BaseDllName.Buffer)); -+ -+ /* show that imports have already been resolved */ -+ imports = RtlImageDirectoryEntryToData(data->Loaded.DllBase, TRUE, IMAGE_DIRECTORY_ENTRY_IMPORT, &size); -+ ok(!!imports, "Expected dll to have imports\n"); -+ -+ for (i = 0; imports[i].Name; i++) -+ { -+ thunk_list = get_rva(data->Loaded.DllBase, (DWORD)imports[i].FirstThunk); -+ if (imports[i].OriginalFirstThunk) -+ import_list = get_rva(data->Loaded.DllBase, (DWORD)imports[i].OriginalFirstThunk); -+ else -+ import_list = thunk_list; -+ -+ for (j = 0; import_list[j].u1.Ordinal; j++) -+ { -+ ok(thunk_list[j].u1.AddressOfData > data->Loaded.SizeOfImage, -+ "Import has not been resolved: %p\n", (void*)thunk_list[j].u1.Function); -+ } -+ } -+} -+ -+static void CALLBACK ldr_notify_callback2(ULONG reason, LDR_DLL_NOTIFICATION_DATA *data, void *context) -+{ -+ DWORD *calls = context; -+ *calls <<= 4; -+ *calls |= reason + 2; -+} -+ -+static BOOL WINAPI fake_dll_main(HINSTANCE instance, DWORD reason, void* reserved) -+{ -+ if (reason == DLL_PROCESS_ATTACH) -+ { -+ *dll_main_data <<= 4; -+ *dll_main_data |= 3; -+ } -+ else if (reason == DLL_PROCESS_DETACH) -+ { -+ *dll_main_data <<= 4; -+ *dll_main_data |= 4; -+ } -+ return orig_entry(instance, reason, reserved); -+} -+ -+static void CALLBACK ldr_notify_callback_dll_main(ULONG reason, LDR_DLL_NOTIFICATION_DATA *data, void *context) -+{ -+ DWORD *calls = context; -+ LIST_ENTRY *mark; -+ LDR_MODULE *mod; -+ -+ *calls <<= 4; -+ *calls |= reason; -+ -+ if (reason != LDR_DLL_NOTIFICATION_REASON_LOADED) -+ return; -+ -+ mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList; -+ mod = CONTAINING_RECORD(mark->Blink, LDR_MODULE, InMemoryOrderModuleList); -+ ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n", -+ data->Loaded.DllBase, mod->BaseAddress); -+ if (mod->BaseAddress != data->Loaded.DllBase) -+ return; -+ -+ orig_entry = mod->EntryPoint; -+ mod->EntryPoint = fake_dll_main; -+ dll_main_data = calls; -+} -+ -+static BOOL WINAPI fake_dll_main_fail(HINSTANCE instance, DWORD reason, void* reserved) -+{ -+ if (reason == DLL_PROCESS_ATTACH) -+ { -+ *dll_main_data <<= 4; -+ *dll_main_data |= 3; -+ } -+ else if (reason == DLL_PROCESS_DETACH) -+ { -+ *dll_main_data <<= 4; -+ *dll_main_data |= 4; -+ } -+ return FALSE; -+} -+ -+static void CALLBACK ldr_notify_callback_fail(ULONG reason, LDR_DLL_NOTIFICATION_DATA *data, void *context) -+{ -+ DWORD *calls = context; -+ LIST_ENTRY *mark; -+ LDR_MODULE *mod; -+ -+ *calls <<= 4; -+ *calls |= reason; -+ -+ if (reason != LDR_DLL_NOTIFICATION_REASON_LOADED) -+ return; -+ -+ mark = &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList; -+ mod = CONTAINING_RECORD(mark->Blink, LDR_MODULE, InMemoryOrderModuleList); -+ ok(mod->BaseAddress == data->Loaded.DllBase, "Expected base address %p, got %p\n", -+ data->Loaded.DllBase, mod->BaseAddress); -+ if (mod->BaseAddress != data->Loaded.DllBase) -+ return; -+ -+ orig_entry = mod->EntryPoint; -+ mod->EntryPoint = fake_dll_main_fail; -+ dll_main_data = calls; -+} -+ -+static void CALLBACK ldr_notify_callback_imports(ULONG reason, LDR_DLL_NOTIFICATION_DATA *data, void *context) -+{ -+ DWORD *calls = context; -+ -+ if (reason != LDR_DLL_NOTIFICATION_REASON_LOADED) -+ return; -+ -+ if (!lstrcmpiW(data->Loaded.BaseDllName->Buffer, crypt32dllW)) -+ { -+ *calls <<= 4; -+ *calls |= 1; -+ } -+ -+ if (!lstrcmpiW(data->Loaded.BaseDllName->Buffer, wintrustdllW)) -+ { -+ *calls <<= 4; -+ *calls |= 2; -+ } -+} -+ -+static void test_LdrRegisterDllNotification(void) -+{ -+ void *cookie, *cookie2; -+ NTSTATUS status; -+ HMODULE mod; -+ DWORD calls; -+ -+ if (!pLdrRegisterDllNotification || !pLdrUnregisterDllNotification) -+ { -+ win_skip("Ldr(Un)RegisterDllNotification not available\n"); -+ return; -+ } -+ -+ /* generic test */ -+ status = pLdrRegisterDllNotification(0, ldr_notify_callback1, &calls, &cookie); -+ ok(!status, "Expected STATUS_SUCCESS, got %08x\n", status); -+ -+ calls = 0; -+ mod = LoadLibraryW(ws2_32dllW); -+ ok(!!mod, "Failed to load library: %d\n", GetLastError()); -+ ok(calls == LDR_DLL_NOTIFICATION_REASON_LOADED, "Expected LDR_DLL_NOTIFICATION_REASON_LOADED, got %x\n", calls); -+ -+ calls = 0; -+ FreeLibrary(mod); -+ ok(calls == LDR_DLL_NOTIFICATION_REASON_UNLOADED, "Expected LDR_DLL_NOTIFICATION_REASON_UNLOADED, got %x\n", calls); -+ -+ /* test order of callbacks */ -+ status = pLdrRegisterDllNotification(0, ldr_notify_callback2, &calls, &cookie2); -+ ok(!status, "Expected STATUS_SUCCESS, got %08x\n", status); -+ -+ calls = 0; -+ mod = LoadLibraryW(ws2_32dllW); -+ ok(!!mod, "Failed to load library: %d\n", GetLastError()); -+ ok(calls == 0x13, "Expected order 0x13, got %x\n", calls); -+ -+ calls = 0; -+ FreeLibrary(mod); -+ ok(calls == 0x24, "Expected order 0x24, got %x\n", calls); -+ -+ pLdrUnregisterDllNotification(cookie2); -+ pLdrUnregisterDllNotification(cookie); -+ -+ /* test dll main order */ -+ status = pLdrRegisterDllNotification(0, ldr_notify_callback_dll_main, &calls, &cookie); -+ ok(!status, "Expected STATUS_SUCCESS, got %08x\n", status); -+ -+ calls = 0; -+ mod = LoadLibraryW(ws2_32dllW); -+ ok(!!mod, "Failed to load library: %d\n", GetLastError()); -+ ok(calls == 0x13, "Expected order 0x13, got %x\n", calls); -+ -+ calls = 0; -+ FreeLibrary(mod); -+ ok(calls == 0x42, "Expected order 0x42, got %x\n", calls); -+ -+ pLdrUnregisterDllNotification(cookie); -+ -+ /* test dll main order */ -+ status = pLdrRegisterDllNotification(0, ldr_notify_callback_fail, &calls, &cookie); -+ ok(!status, "Expected STATUS_SUCCESS, got %08x\n", status); -+ -+ calls = 0; -+ mod = LoadLibraryW(ws2_32dllW); -+ ok(!mod, "Expected library to fail loading\n"); -+ ok(calls == 0x1342, "Expected order 0x1342, got %x\n", calls); -+ -+ pLdrUnregisterDllNotification(cookie); -+ -+ /* test dll with dependencies */ -+ status = pLdrRegisterDllNotification(0, ldr_notify_callback_imports, &calls, &cookie); -+ ok(!status, "Expected STATUS_SUCCESS, got %08x\n", status); -+ -+ calls = 0; -+ mod = LoadLibraryW(wintrustdllW); -+ ok(!!mod, "Failed to load library: %d\n", GetLastError()); -+ ok(calls == 0x12, "Expected order 0x12, got %x\n", calls); -+ -+ FreeLibrary(mod); -+ pLdrUnregisterDllNotification(cookie); -+} -+ - START_TEST(rtl) - { - InitFunctionPtrs(); -@@ -2369,4 +2618,5 @@ START_TEST(rtl) - test_LdrEnumerateLoadedModules(); - test_RtlQueryPackageIdentity(); - test_RtlMakeSelfRelativeSD(); -+ test_LdrRegisterDllNotification(); - } --- -1.9.1 - diff --git a/patches/ntdll-LdrRegisterDllNotification/definition b/patches/ntdll-LdrRegisterDllNotification/definition deleted file mode 100644 index 57bf13f8..00000000 --- a/patches/ntdll-LdrRegisterDllNotification/definition +++ /dev/null @@ -1,5 +0,0 @@ -Fixes: [44585] Implement LdrRegisterDllNotification/LdrUnregisterDllNotification -# note: originally without explanation, unless "The title says it all" counts as explanation -Depends: ntdll-HashLinks -Depends: ntdll-RtlQueryPackageIdentity -Depends: ntdll-Hide_Wine_Exports diff --git a/patches/ntdll-RtlQueryPackageIdentity/0003-ntdll-tests-Add-basic-tests-for-RtlQueryPackageIdent.patch b/patches/ntdll-RtlQueryPackageIdentity/0003-ntdll-tests-Add-basic-tests-for-RtlQueryPackageIdent.patch index 87fed636..67c2c4ae 100644 --- a/patches/ntdll-RtlQueryPackageIdentity/0003-ntdll-tests-Add-basic-tests-for-RtlQueryPackageIdent.patch +++ b/patches/ntdll-RtlQueryPackageIdentity/0003-ntdll-tests-Add-basic-tests-for-RtlQueryPackageIdent.patch @@ -1,4 +1,4 @@ -From 79d723df10d8acf6e284fea53008e3543e9115f2 Mon Sep 17 00:00:00 2001 +From b7b1ff9a632ed7c9ea38bce977a7b754526adb1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 17 Jan 2016 00:50:50 +0100 Subject: [PATCH] ntdll/tests: Add basic tests for RtlQueryPackageIdentity. @@ -9,7 +9,7 @@ Subject: [PATCH] ntdll/tests: Add basic tests for RtlQueryPackageIdentity. 2 files changed, 77 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/tests/Makefile.in b/dlls/ntdll/tests/Makefile.in -index 5c70f3f..0de4fe8 100644 +index a1b8588..c5c5191 100644 --- a/dlls/ntdll/tests/Makefile.in +++ b/dlls/ntdll/tests/Makefile.in @@ -1,5 +1,5 @@ @@ -20,7 +20,7 @@ index 5c70f3f..0de4fe8 100644 C_SRCS = \ atom.c \ diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c -index 2e3a7de..02ae1c1 100644 +index 881bc1a..5862140 100644 --- a/dlls/ntdll/tests/rtl.c +++ b/dlls/ntdll/tests/rtl.c @@ -25,6 +25,9 @@ @@ -40,17 +40,17 @@ index 2e3a7de..02ae1c1 100644 +static NTSTATUS (WINAPI *pRtlQueryPackageIdentity)(HANDLE, WCHAR*, SIZE_T*, WCHAR*, SIZE_T*, BOOLEAN*); static NTSTATUS (WINAPI *pRtlMakeSelfRelativeSD)(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD); static NTSTATUS (WINAPI *pRtlAbsoluteToSelfRelativeSD)(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PULONG); - -@@ -155,6 +159,7 @@ static void InitFunctionPtrs(void) + static NTSTATUS (WINAPI *pLdrRegisterDllNotification)(ULONG, PLDR_DLL_NOTIFICATION_FUNCTION, void *, void **); +@@ -162,6 +166,7 @@ static void InitFunctionPtrs(void) pRtlIsCriticalSectionLockedByThread = (void *)GetProcAddress(hntdll, "RtlIsCriticalSectionLockedByThread"); pRtlInitializeCriticalSectionEx = (void *)GetProcAddress(hntdll, "RtlInitializeCriticalSectionEx"); pLdrEnumerateLoadedModules = (void *)GetProcAddress(hntdll, "LdrEnumerateLoadedModules"); + pRtlQueryPackageIdentity = (void *)GetProcAddress(hntdll, "RtlQueryPackageIdentity"); pRtlMakeSelfRelativeSD = (void *)GetProcAddress(hntdll, "RtlMakeSelfRelativeSD"); pRtlAbsoluteToSelfRelativeSD = (void *)GetProcAddress(hntdll, "RtlAbsoluteToSelfRelativeSD"); - } -@@ -2259,6 +2264,76 @@ static void test_RtlMakeSelfRelativeSD(void) - ok( status == STATUS_BAD_DESCRIPTOR_FORMAT, "got %08x\n", status ); + pLdrRegisterDllNotification = (void *)GetProcAddress(hntdll, "LdrRegisterDllNotification"); +@@ -2517,6 +2522,76 @@ static void test_LdrRegisterDllNotification(void) + pLdrUnregisterDllNotification(cookie); } +static void test_RtlQueryPackageIdentity(void) @@ -126,12 +126,13 @@ index 2e3a7de..02ae1c1 100644 START_TEST(rtl) { InitFunctionPtrs(); -@@ -2292,5 +2367,6 @@ START_TEST(rtl) +@@ -2550,6 +2625,7 @@ START_TEST(rtl) test_RtlInitializeCriticalSectionEx(); test_RtlLeaveCriticalSection(); test_LdrEnumerateLoadedModules(); + test_RtlQueryPackageIdentity(); test_RtlMakeSelfRelativeSD(); + test_LdrRegisterDllNotification(); } -- 1.9.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index e07587f7..bcdf4a7c 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "85f1a79be8bbb9b62ad88e0d0fbf1e005fd3ba16" + echo "6a04cf4a69205ddf6827fb2a4b97862fd1947c62" } # Show version information @@ -221,7 +221,6 @@ patch_enable_all () enable_ntdll_Junction_Points="$1" enable_ntdll_LDR_MODULE="$1" enable_ntdll_LdrGetDllHandle="$1" - enable_ntdll_LdrRegisterDllNotification="$1" enable_ntdll_Loader_Machine_Type="$1" enable_ntdll_NtAccessCheck="$1" enable_ntdll_NtContinue="$1" @@ -841,9 +840,6 @@ patch_enable () ntdll-LdrGetDllHandle) enable_ntdll_LdrGetDllHandle="$2" ;; - ntdll-LdrRegisterDllNotification) - enable_ntdll_LdrRegisterDllNotification="$2" - ;; ntdll-Loader_Machine_Type) enable_ntdll_Loader_Machine_Type="$2" ;; @@ -2130,21 +2126,6 @@ if test "$enable_ntdll_NtDevicePath" -eq 1; then enable_ntdll_Pipe_SpecialCharacters=1 fi -if test "$enable_ntdll_LdrRegisterDllNotification" -eq 1; then - if test "$enable_ntdll_HashLinks" -gt 1; then - abort "Patchset ntdll-HashLinks disabled, but ntdll-LdrRegisterDllNotification depends on that." - fi - if test "$enable_ntdll_Hide_Wine_Exports" -gt 1; then - abort "Patchset ntdll-Hide_Wine_Exports disabled, but ntdll-LdrRegisterDllNotification depends on that." - fi - if test "$enable_ntdll_RtlQueryPackageIdentity" -gt 1; then - abort "Patchset ntdll-RtlQueryPackageIdentity disabled, but ntdll-LdrRegisterDllNotification depends on that." - fi - enable_ntdll_HashLinks=1 - enable_ntdll_Hide_Wine_Exports=1 - enable_ntdll_RtlQueryPackageIdentity=1 -fi - if test "$enable_ntdll_Junction_Points" -eq 1; then if test "$enable_ntdll_NtQueryEaFile" -gt 1; then abort "Patchset ntdll-NtQueryEaFile disabled, but ntdll-Junction_Points depends on that." @@ -5113,36 +5094,6 @@ if test "$enable_ntdll_LdrGetDllHandle" -eq 1; then ) >> "$patchlist" fi -# Patchset ntdll-RtlQueryPackageIdentity -# | -# | Modified files: -# | * dlls/ntdll/tests/Makefile.in, dlls/ntdll/tests/rtl.c -# | -if test "$enable_ntdll_RtlQueryPackageIdentity" -eq 1; then - patch_apply ntdll-RtlQueryPackageIdentity/0003-ntdll-tests-Add-basic-tests-for-RtlQueryPackageIdent.patch - ( - printf '%s\n' '+ { "Michael Müller", "ntdll/tests: Add basic tests for RtlQueryPackageIdentity.", 1 },'; - ) >> "$patchlist" -fi - -# Patchset ntdll-LdrRegisterDllNotification -# | -# | This patchset has the following (direct or indirect) dependencies: -# | * ntdll-LDR_MODULE, ntdll-HashLinks, ntdll-ThreadTime, ntdll-Hide_Wine_Exports, ntdll-RtlQueryPackageIdentity -# | -# | This patchset fixes the following Wine bugs: -# | * [#44585] Implement LdrRegisterDllNotification/LdrUnregisterDllNotification -# | -# | Modified files: -# | * dlls/ntdll/loader.c, dlls/ntdll/tests/rtl.c -# | -if test "$enable_ntdll_LdrRegisterDllNotification" -eq 1; then - patch_apply ntdll-LdrRegisterDllNotification/0001-ntdll-Implement-LdrRegisterDllNotification-and-LdrUn.patch - ( - printf '%s\n' '+ { "Michael Müller", "ntdll: Implement LdrRegisterDllNotification and LdrUnregisterDllNotification.", 1 },'; - ) >> "$patchlist" -fi - # Patchset ntdll-NtAccessCheck # | # | Modified files: @@ -5321,6 +5272,18 @@ if test "$enable_ntdll_RtlCaptureStackBackTrace" -eq 1; then ) >> "$patchlist" fi +# Patchset ntdll-RtlQueryPackageIdentity +# | +# | Modified files: +# | * dlls/ntdll/tests/Makefile.in, dlls/ntdll/tests/rtl.c +# | +if test "$enable_ntdll_RtlQueryPackageIdentity" -eq 1; then + patch_apply ntdll-RtlQueryPackageIdentity/0003-ntdll-tests-Add-basic-tests-for-RtlQueryPackageIdent.patch + ( + printf '%s\n' '+ { "Michael Müller", "ntdll/tests: Add basic tests for RtlQueryPackageIdentity.", 1 },'; + ) >> "$patchlist" +fi + # Patchset ntdll-RtlGetUnloadEventTraceEx # | # | This patchset has the following (direct or indirect) dependencies: diff --git a/patches/shlwapi-UrlCombine/0001-shlwapi-tests-Add-additional-tests-for-UrlCombine-and-.patch b/patches/shlwapi-UrlCombine/0001-shlwapi-tests-Add-additional-tests-for-UrlCombine-and-.patch index 8a7b0567..4a0336fe 100644 --- a/patches/shlwapi-UrlCombine/0001-shlwapi-tests-Add-additional-tests-for-UrlCombine-and-.patch +++ b/patches/shlwapi-UrlCombine/0001-shlwapi-tests-Add-additional-tests-for-UrlCombine-and-.patch @@ -1,7 +1,7 @@ -From 0d174cd3e053087a2e74ebad65676c375bc3b774 Mon Sep 17 00:00:00 2001 +From d753083297595b1ed4d3533587ddc21dee47fd88 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 17 Jan 2014 01:19:41 +0100 -Subject: shlwapi/tests: Add additional tests for UrlCombine and +Subject: [PATCH] shlwapi/tests: Add additional tests for UrlCombine and UrlCanonicalize --- @@ -9,7 +9,7 @@ Subject: shlwapi/tests: Add additional tests for UrlCombine and 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c -index f9fc79a..d9bd4f1 100644 +index d30737f..37df286 100644 --- a/dlls/shlwapi/tests/url.c +++ b/dlls/shlwapi/tests/url.c @@ -204,7 +204,15 @@ static const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = { @@ -52,7 +52,7 @@ index f9fc79a..d9bd4f1 100644 {"file:///C:\\dir\\file.txt", "test.txt", 0, S_OK, "file:///C:/dir/test.txt"}, {"file:///C:\\dir\\file.txt#hash\\hash", "test.txt", 0, S_OK, "file:///C:/dir/file.txt#hash/test.txt"}, {"file:///C:\\dir\\file.html#hash\\hash", "test.html", 0, S_OK, "file:///C:/dir/test.html"}, -@@ -1159,7 +1177,7 @@ static void test_UrlCanonicalizeW(void) +@@ -1197,7 +1215,7 @@ static void test_UrlCanonicalizeW(void) /* ########################### */ @@ -61,7 +61,7 @@ index f9fc79a..d9bd4f1 100644 { HRESULT hr; CHAR szReturnUrl[INTERNET_MAX_URL_LENGTH]; -@@ -1184,34 +1202,42 @@ static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFla +@@ -1222,34 +1240,42 @@ static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFla dwSize = 0; hr = pUrlCombineA(szUrl1, szUrl2, NULL, &dwSize, dwFlags); ok(hr == E_POINTER, "Checking length of string, return was 0x%08x, expected 0x%08x\n", hr, E_POINTER); @@ -112,9 +112,9 @@ index f9fc79a..d9bd4f1 100644 if(SUCCEEDED(hr)) { wszConvertedUrl = GetWideString(szReturnUrl); ok(lstrcmpW(wszReturnUrl, wszConvertedUrl)==0, "Strings didn't match between ascii and unicode UrlCombine!\n"); -@@ -1231,7 +1257,7 @@ static void test_UrlCombine(void) +@@ -1269,7 +1295,7 @@ static void test_UrlCombine(void) unsigned int i; - for(i=0; i