diff --git a/patches/advapi32-Token_Integrity_Level/0008-ntdll-Implement-process-token-elevation-through-mani.patch b/patches/advapi32-Token_Integrity_Level/0008-ntdll-Implement-process-token-elevation-through-mani.patch index 898c30f7..877388e4 100644 --- a/patches/advapi32-Token_Integrity_Level/0008-ntdll-Implement-process-token-elevation-through-mani.patch +++ b/patches/advapi32-Token_Integrity_Level/0008-ntdll-Implement-process-token-elevation-through-mani.patch @@ -1,18 +1,18 @@ -From 37c7e83f08dbd2a9fd757d190737a9aee3fa8bcb Mon Sep 17 00:00:00 2001 +From 36762a2034391d67fc73ac037f8a7913cee911e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sat, 5 Aug 2017 03:39:55 +0200 Subject: [PATCH] ntdll: Implement process token elevation through manifests. --- - dlls/ntdll/loader.c | 44 +++++++++++++++++++++++++++++++++++++++++++- + dlls/ntdll/loader.c | 39 ++++++++++++++++++++++++++++++++++++++- server/process.c | 8 ++++++++ server/process.h | 1 + server/protocol.def | 7 +++++++ server/token.c | 14 ++++++++++++++ - 5 files changed, 73 insertions(+), 1 deletion(-) + 5 files changed, 68 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 031bf83b4b1..fbe4d30af0b 100644 +index 031bf83b4..c2810d50b 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -3804,6 +3804,32 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow @@ -64,23 +64,18 @@ index 031bf83b4b1..fbe4d30af0b 100644 /*********************************************************************** * RtlImageRvaToSection (NTDLL.@) */ -@@ -4233,6 +4259,8 @@ void __wine_process_init(void) +@@ -4233,6 +4259,7 @@ void __wine_process_init(void) 's','y','s','t','e','m','3','2','\\', 'k','e','r','n','e','l','3','2','.','d','l','l',0}; RTL_USER_PROCESS_PARAMETERS *params; -+ static const WCHAR globalflagW[] = {'G','l','o','b','a','l','F','l','a','g',0}; + ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION runlevel; WINE_MODREF *wm; NTSTATUS status; ANSI_STRING func_name; -@@ -4305,6 +4333,20 @@ void __wine_process_init(void) +@@ -4305,6 +4332,16 @@ void __wine_process_init(void) virtual_set_large_address_space(); -+ LdrQueryImageFileExecutionOptions( &wm->ldr.FullDllName, globalflagW, REG_DWORD, -+ &NtCurrentTeb()->Peb->NtGlobalFlag, sizeof(DWORD), NULL ); -+ heap_set_debug_flags( GetProcessHeap() ); -+ + /* elevate process if necessary */ + status = RtlQueryInformationActivationContext( 0, NULL, 0, RunlevelInformationInActivationContext, + &runlevel, sizeof(runlevel), NULL ); @@ -95,7 +90,7 @@ index 031bf83b4b1..fbe4d30af0b 100644 RemoveEntryList( &wm->ldr.InLoadOrderModuleList ); InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderModuleList ); diff --git a/server/process.c b/server/process.c -index b4b239d2fd7..3cfc6f88fad 100644 +index b4b239d2f..3cfc6f88f 100644 --- a/server/process.c +++ b/server/process.c @@ -1107,6 +1107,14 @@ struct process_snapshot *process_snap( int *count ) @@ -114,7 +109,7 @@ index b4b239d2fd7..3cfc6f88fad 100644 DECL_HANDLER(new_process) { diff --git a/server/process.h b/server/process.h -index 20ff6beda68..e072a35ba5a 100644 +index 20ff6beda..e072a35ba 100644 --- a/server/process.h +++ b/server/process.h @@ -139,6 +139,7 @@ extern void kill_debugged_processes( struct thread *debugger, int exit_code ); @@ -126,7 +121,7 @@ index 20ff6beda68..e072a35ba5a 100644 /* console functions */ extern void inherit_console(struct thread *parent_thread, struct process *process, obj_handle_t hconin); diff --git a/server/protocol.def b/server/protocol.def -index 72fab786a03..042072f58bd 100644 +index 72fab786a..042072f58 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -3743,6 +3743,13 @@ struct handle_info @@ -144,7 +139,7 @@ index 72fab786a03..042072f58bd 100644 @REQ(create_completion) unsigned int access; /* desired access to a port */ diff --git a/server/token.c b/server/token.c -index fcab799557c..181219d2179 100644 +index fcab79955..181219d21 100644 --- a/server/token.c +++ b/server/token.c @@ -1806,3 +1806,17 @@ DECL_HANDLER(create_token) @@ -166,5 +161,5 @@ index fcab799557c..181219d2179 100644 + } +} -- -2.17.1 +2.23.0 diff --git a/patches/eventfd_synchronization/0042-ntdll-Use-shared-memory-segments-to-store-semaphore-.patch b/patches/eventfd_synchronization/0042-ntdll-Use-shared-memory-segments-to-store-semaphore-.patch index b191549e..a91a66db 100644 --- a/patches/eventfd_synchronization/0042-ntdll-Use-shared-memory-segments-to-store-semaphore-.patch +++ b/patches/eventfd_synchronization/0042-ntdll-Use-shared-memory-segments-to-store-semaphore-.patch @@ -1,4 +1,4 @@ -From 7103ff251691b420248ff8ddb80d544f06cc8b3a Mon Sep 17 00:00:00 2001 +From ac0e8624e1fc33859e2ea753da05728ac82f8a1b Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 11 Jun 2018 13:10:36 -0500 Subject: [PATCH] ntdll: Use shared memory segments to store semaphore and @@ -12,11 +12,12 @@ since now we don't have to allocate separate structures. --- dlls/ntdll/esync.c | 349 +++++++++++++++++++------------------------- dlls/ntdll/esync.h | 1 + - dlls/ntdll/thread.c | 4 + - 3 files changed, 155 insertions(+), 199 deletions(-) + dlls/ntdll/loader.c | 3 + + dlls/ntdll/thread.c | 1 + + 4 files changed, 155 insertions(+), 199 deletions(-) diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c -index c1d8882d817..e8ee1cbc9ff 100644 +index c1d8882d8..e8ee1cbc9 100644 --- a/dlls/ntdll/esync.c +++ b/dlls/ntdll/esync.c @@ -32,6 +32,7 @@ @@ -658,7 +659,7 @@ index c1d8882d817..e8ee1cbc9ff 100644 } } diff --git a/dlls/ntdll/esync.h b/dlls/ntdll/esync.h -index f79b9a06c90..88f491e5ab4 100644 +index f79b9a06c..88f491e5a 100644 --- a/dlls/ntdll/esync.h +++ b/dlls/ntdll/esync.h @@ -19,6 +19,7 @@ @@ -669,8 +670,22 @@ index f79b9a06c90..88f491e5ab4 100644 extern NTSTATUS esync_close( HANDLE handle ) DECLSPEC_HIDDEN; extern NTSTATUS esync_create_semaphore(HANDLE *handle, ACCESS_MASK access, +diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c +index 9972d680e..2f66065e3 100644 +--- a/dlls/ntdll/loader.c ++++ b/dlls/ntdll/loader.c +@@ -4407,6 +4407,9 @@ void __wine_process_init(void) + init_directories(); + init_user_process_params( info_size ); + ++ if (do_esync()) ++ esync_init(); ++ + NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 ); + + /* retrieve current umask */ diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c -index e59cd2a5073..18f73b4911c 100644 +index f699d01d6..c86e02424 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -51,6 +51,7 @@ @@ -681,16 +696,6 @@ index e59cd2a5073..18f73b4911c 100644 WINE_DEFAULT_DEBUG_CHANNEL(thread); -@@ -366,6 +367,9 @@ TEB *thread_init(void) - __wine_user_shared_data(); - fill_cpu_info(); - -+ if (do_esync()) -+ esync_init(); -+ - NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 ); - - return teb; -- -2.17.1 +2.23.0 diff --git a/patches/eventfd_synchronization/0074-ntdll-server-Abort-if-esync-is-enabled-for-the-serve.patch b/patches/eventfd_synchronization/0074-ntdll-server-Abort-if-esync-is-enabled-for-the-serve.patch index b1dafe6f..158a052e 100644 --- a/patches/eventfd_synchronization/0074-ntdll-server-Abort-if-esync-is-enabled-for-the-serve.patch +++ b/patches/eventfd_synchronization/0074-ntdll-server-Abort-if-esync-is-enabled-for-the-serve.patch @@ -1,4 +1,4 @@ -From 4dabc377ea54ea04652677aa5ff4e7a2d8b37c33 Mon Sep 17 00:00:00 2001 +From ab72938e7aa2b3355f24a72c019ab3d0c77689da Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Sat, 4 Aug 2018 15:15:12 -0500 Subject: [PATCH] ntdll, server: Abort if esync is enabled for the server but @@ -6,12 +6,12 @@ Subject: [PATCH] ntdll, server: Abort if esync is enabled for the server but --- dlls/ntdll/esync.c | 28 +++++++++++++++++++++++++++- - dlls/ntdll/thread.c | 3 +-- + dlls/ntdll/loader.c | 3 +-- server/esync.c | 12 ++++++++++++ 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c -index 8255810a924..fb1953fb90c 100644 +index 8255810a9..fb1953fb9 100644 --- a/dlls/ntdll/esync.c +++ b/dlls/ntdll/esync.c @@ -115,10 +115,29 @@ static void **shm_addrs; @@ -60,13 +60,13 @@ index 8255810a924..fb1953fb90c 100644 pagesize = sysconf( _SC_PAGESIZE ); -diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c -index 192186299db..6c652d9fdf2 100644 ---- a/dlls/ntdll/thread.c -+++ b/dlls/ntdll/thread.c -@@ -368,8 +368,7 @@ TEB *thread_init(void) - __wine_user_shared_data(); - fill_cpu_info(); +diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c +index 2f66065e3..98cd95055 100644 +--- a/dlls/ntdll/loader.c ++++ b/dlls/ntdll/loader.c +@@ -4407,8 +4407,7 @@ void __wine_process_init(void) + init_directories(); + init_user_process_params( info_size ); - if (do_esync()) - esync_init(); @@ -75,7 +75,7 @@ index 192186299db..6c652d9fdf2 100644 NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 ); diff --git a/server/esync.c b/server/esync.c -index 1fc9316b1b5..cb4de2daa77 100644 +index 1fc9316b1..cb4de2daa 100644 --- a/server/esync.c +++ b/server/esync.c @@ -395,6 +395,18 @@ DECL_HANDLER(create_esync) @@ -98,5 +98,5 @@ index 1fc9316b1b5..cb4de2daa77 100644 if ((esync = create_esync( root, &name, objattr->attributes, req->initval, req->flags, req->type, sd ))) -- -2.17.1 +2.23.0 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 c074b391..afa34ec7 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,16 +1,16 @@ -From 3704033a2a378975d9c4073af426e0540f493a3b Mon Sep 17 00:00:00 2001 +From fbc3fe62e5d4cf6c7044d7aeef2f645655e02a19 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 applications. --- - dlls/ntdll/loader.c | 102 +++++++++++++++++++++++++++++++++++++++- + dlls/ntdll/loader.c | 100 +++++++++++++++++++++++++++++++++++++++- dlls/ntdll/ntdll_misc.h | 5 ++ - 2 files changed, 106 insertions(+), 1 deletion(-) + 2 files changed, 104 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index fbe4d30af0b..22ba88a72ae 100644 +index c2810d50b..6594abcf1 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -70,6 +70,7 @@ const WCHAR system_dir[] = {'C',':','\\','w','i','n','d','o','w','s','\\', @@ -146,19 +146,17 @@ index fbe4d30af0b..22ba88a72ae 100644 { *address = proc; ret = STATUS_SUCCESS; -@@ -4331,6 +4427,10 @@ void __wine_process_init(void) +@@ -4330,6 +4426,8 @@ void __wine_process_init(void) NtTerminateProcess( GetCurrentProcess(), STATUS_INVALID_IMAGE_FORMAT ); } -+ NtCurrentTeb()->Peb->LoaderLock = &loader_section; -+ + hidden_exports_init( wm->ldr.FullDllName.Buffer ); + virtual_set_large_address_space(); - LdrQueryImageFileExecutionOptions( &wm->ldr.FullDllName, globalflagW, REG_DWORD, + /* elevate process if necessary */ diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index 7ceb3132a7c..ac51c78cff7 100644 +index 7ceb3132a..ac51c78cf 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -269,6 +269,11 @@ extern SYSTEM_CPU_INFORMATION cpu_info DECLSPEC_HIDDEN; @@ -174,5 +172,5 @@ index 7ceb3132a7c..ac51c78cff7 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.17.1 +2.23.0 diff --git a/patches/ntdll-Hide_Wine_Exports/definition b/patches/ntdll-Hide_Wine_Exports/definition index bc63a18f..52e3041b 100644 --- a/patches/ntdll-Hide_Wine_Exports/definition +++ b/patches/ntdll-Hide_Wine_Exports/definition @@ -1,2 +1,3 @@ Fixes: [38656] Add support for hiding wine version information from applications Depends: ntdll-ThreadTime +Depends: advapi32-Token_Integrity_Level diff --git a/patches/ntdll-User_Shared_Data/0001-ntdll-Move-code-to-update-user-shared-data-into-a-se.patch b/patches/ntdll-User_Shared_Data/0001-ntdll-Move-code-to-update-user-shared-data-into-a-se.patch index 092e5189..2c4027e3 100644 --- a/patches/ntdll-User_Shared_Data/0001-ntdll-Move-code-to-update-user-shared-data-into-a-se.patch +++ b/patches/ntdll-User_Shared_Data/0001-ntdll-Move-code-to-update-user-shared-data-into-a-se.patch @@ -1,4 +1,4 @@ -From 3e1f96926c05104663b171fe2a4bad2b2a0679e5 Mon Sep 17 00:00:00 2001 +From 08fecb796ebe242402b94e46d20e4798f1983cff Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 26 Nov 2014 10:46:09 +0100 Subject: [PATCH] ntdll: Move code to update user shared data into a separate @@ -6,14 +6,14 @@ Subject: [PATCH] ntdll: Move code to update user shared data into a separate --- dlls/ntdll/ntdll.spec | 3 +++ - dlls/ntdll/thread.c | 24 ++++++++++++++++++++---- - 2 files changed, 23 insertions(+), 4 deletions(-) + dlls/ntdll/thread.c | 22 ++++++++++++++++++---- + 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index a42b4fc2482..8dd58138718 100644 +index 5057e2b07..8ed2a4100 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec -@@ -1571,3 +1571,6 @@ +@@ -1575,3 +1575,6 @@ # Filesystem @ cdecl wine_nt_to_unix_file_name(ptr ptr long long) @ cdecl wine_unix_to_nt_file_name(ptr ptr) @@ -21,7 +21,7 @@ index a42b4fc2482..8dd58138718 100644 +# User shared data +@ cdecl __wine_user_shared_data() diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c -index d010c018102..b5b11e3671e 100644 +index d010c0181..01b58ebea 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -274,7 +274,6 @@ TEB *thread_init(void) @@ -32,7 +32,7 @@ index d010c018102..b5b11e3671e 100644 NTSTATUS status; struct ntdll_thread_data *thread_data; -@@ -349,7 +348,25 @@ TEB *thread_init(void) +@@ -349,7 +348,23 @@ TEB *thread_init(void) debug_init(); set_process_name( __wine_main_argc, __wine_main_argv ); @@ -41,8 +41,6 @@ index d010c018102..b5b11e3671e 100644 + __wine_user_shared_data(); + fill_cpu_info(); + -+ NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 ); -+ + return teb; +} + @@ -59,7 +57,7 @@ index d010c018102..b5b11e3671e 100644 NtQuerySystemTime( &now ); user_shared_data->SystemTime.LowPart = now.u.LowPart; user_shared_data->SystemTime.High1Time = user_shared_data->SystemTime.High2Time = now.u.HighPart; -@@ -357,9 +374,8 @@ TEB *thread_init(void) +@@ -357,9 +372,8 @@ TEB *thread_init(void) user_shared_data->u.TickCount.High2Time = user_shared_data->u.TickCount.High1Time; user_shared_data->TickCountLowDeprecated = user_shared_data->u.TickCount.LowPart; user_shared_data->TickCountMultiplier = 1 << 24; @@ -71,5 +69,5 @@ index d010c018102..b5b11e3671e 100644 BOOL read_process_memory_stats(int unix_pid, VM_COUNTERS *pvmi) -- -2.17.1 +2.23.0 diff --git a/patches/ntdll-User_Shared_Data/0003-ntdll-Create-thread-to-update-user_shared_data-time-.patch b/patches/ntdll-User_Shared_Data/0003-ntdll-Create-thread-to-update-user_shared_data-time-.patch index 8126a815..1b6625e1 100644 --- a/patches/ntdll-User_Shared_Data/0003-ntdll-Create-thread-to-update-user_shared_data-time-.patch +++ b/patches/ntdll-User_Shared_Data/0003-ntdll-Create-thread-to-update-user_shared_data-time-.patch @@ -1,4 +1,4 @@ -From a0f37e4e406de37860045aaf5e36fc811cda8ce6 Mon Sep 17 00:00:00 2001 +From 163347374f655dc94b2c864d599051e2d13aea70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 5 May 2017 05:40:50 +0200 Subject: [PATCH] ntdll: Create thread to update user_shared_data time values @@ -12,7 +12,7 @@ Subject: [PATCH] ntdll: Create thread to update user_shared_data time values 4 files changed, 113 insertions(+), 8 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index b4f0397f574..fc44dcfe3e5 100644 +index 1c20ae7ef..5efcc3c9d 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -3824,6 +3824,36 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule) @@ -52,19 +52,19 @@ index b4f0397f574..fc44dcfe3e5 100644 /****************************************************************** * LdrInitializeThunk (NTDLL.@) * -@@ -4429,6 +4459,7 @@ void __wine_process_init(void) +@@ -4399,6 +4429,7 @@ void __wine_process_init(void) + NtTerminateProcess( GetCurrentProcess(), STATUS_INVALID_IMAGE_FORMAT ); + } - NtCurrentTeb()->Peb->LoaderLock = &loader_section; - + user_shared_data_init(); hidden_exports_init( wm->ldr.FullDllName.Buffer ); virtual_set_large_address_space(); diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index ac51c78cff7..47d85d5e35a 100644 +index 687d460ec..f49d7b65f 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -196,6 +196,9 @@ extern void virtual_set_large_address_space(void) DECLSPEC_HIDDEN; +@@ -193,6 +193,9 @@ extern void virtual_set_large_address_space(void) DECLSPEC_HIDDEN; extern void virtual_fill_image_information( const pe_image_info_t *pe_info, SECTION_IMAGE_INFORMATION *info ) DECLSPEC_HIDDEN; extern struct _KUSER_SHARED_DATA *user_shared_data DECLSPEC_HIDDEN; @@ -75,7 +75,7 @@ index ac51c78cff7..47d85d5e35a 100644 /* completion */ extern NTSTATUS NTDLL_AddCompletion( HANDLE hFile, ULONG_PTR CompletionValue, diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c -index 9ca81f89ecb..bf97cbfa8e1 100644 +index b5b11e367..889500d04 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -47,6 +47,7 @@ @@ -97,7 +97,7 @@ index 9ca81f89ecb..bf97cbfa8e1 100644 static const WCHAR default_windirW[] = {'C',':','\\','w','i','n','d','o','w','s',0}; void (WINAPI *kernel32_start_process)(LPTHREAD_START_ROUTINE,void*) = NULL; -@@ -292,7 +295,7 @@ TEB *thread_init(void) +@@ -290,7 +293,7 @@ TEB *thread_init(void) MESSAGE( "wine: failed to map the shared user data: %08x\n", status ); exit(1); } @@ -183,7 +183,7 @@ index 9ca81f89ecb..bf97cbfa8e1 100644 { BOOL ret = FALSE; diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c -index 68249de902e..54eb6c7ffe8 100644 +index 68249de90..54eb6c7ff 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -2102,6 +2102,7 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err, BOOL on_signal_stack ) @@ -219,5 +219,5 @@ index 68249de902e..54eb6c7ffe8 100644 } -- -2.17.1 +2.23.0 diff --git a/patches/ntoskrnl.exe-IoInvalidateDeviceRelations/definition b/patches/ntoskrnl.exe-IoInvalidateDeviceRelations/definition deleted file mode 100644 index 54a4e964..00000000 --- a/patches/ntoskrnl.exe-IoInvalidateDeviceRelations/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [33498] Implement framework for installing and running native PnP drivers. diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index ec22bc70..51c7aa3f 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -1579,6 +1579,13 @@ if test "$enable_ws2_32_TransmitFile" -eq 1; then enable_server_Desktop_Refcount=1 fi +if test "$enable_wow64cpu_Wow64Transition" -eq 1; then + if test "$enable_advapi32_Token_Integrity_Level" -gt 1; then + abort "Patchset advapi32-Token_Integrity_Level disabled, but wow64cpu-Wow64Transition depends on that." + fi + enable_advapi32_Token_Integrity_Level=1 +fi + if test "$enable_winex11_WM_WINDOWPOSCHANGING" -eq 1; then if test "$enable_winex11__NET_ACTIVE_WINDOW" -gt 1; then abort "Patchset winex11-_NET_ACTIVE_WINDOW disabled, but winex11-WM_WINDOWPOSCHANGING depends on that." @@ -1914,9 +1921,13 @@ if test "$enable_ntdll_User_Shared_Data" -eq 1; then fi if test "$enable_ntdll_Hide_Wine_Exports" -eq 1; then + if test "$enable_advapi32_Token_Integrity_Level" -gt 1; then + abort "Patchset advapi32-Token_Integrity_Level disabled, but ntdll-Hide_Wine_Exports depends on that." + fi if test "$enable_ntdll_ThreadTime" -gt 1; then abort "Patchset ntdll-ThreadTime disabled, but ntdll-Hide_Wine_Exports depends on that." fi + enable_advapi32_Token_Integrity_Level=1 enable_ntdll_ThreadTime=1 fi @@ -3425,7 +3436,7 @@ fi # Patchset ntdll-Hide_Wine_Exports # | # | This patchset has the following (direct or indirect) dependencies: -# | * ntdll-ThreadTime +# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, ntdll-ThreadTime # | # | This patchset fixes the following Wine bugs: # | * [#38656] Add support for hiding wine version information from applications @@ -3443,7 +3454,7 @@ fi # Patchset ntdll-User_Shared_Data # | # | This patchset has the following (direct or indirect) dependencies: -# | * ntdll-ThreadTime, ntdll-Hide_Wine_Exports +# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, ntdll-ThreadTime, ntdll-Hide_Wine_Exports # | # | This patchset fixes the following Wine bugs: # | * [#29168] Update user shared data at realtime @@ -3468,7 +3479,8 @@ fi # Patchset winebuild-Fake_Dlls # | # | This patchset has the following (direct or indirect) dependencies: -# | * ntdll-ThreadTime, ntdll-Hide_Wine_Exports, ntdll-User_Shared_Data +# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, ntdll-ThreadTime, ntdll-Hide_Wine_Exports, +# | ntdll-User_Shared_Data # | # | This patchset fixes the following Wine bugs: # | * [#21232] Chromium-based browser engines (Chrome, Opera, Comodo Dragon, SRWare Iron) crash on startup unless '--no- @@ -3514,7 +3526,8 @@ fi # Patchset ntdll-RtlCreateUserThread # | # | This patchset has the following (direct or indirect) dependencies: -# | * ntdll-ThreadTime, ntdll-Hide_Wine_Exports, ntdll-User_Shared_Data, winebuild-Fake_Dlls +# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, ntdll-ThreadTime, ntdll-Hide_Wine_Exports, +# | ntdll-User_Shared_Data, winebuild-Fake_Dlls # | # | This patchset fixes the following Wine bugs: # | * [#45571] League of Legends 8.12+ fails to start a game (anticheat engine, hooking of NtCreateThread/Ex) @@ -3709,16 +3722,16 @@ fi # | # | Modified files: # | * README.esync, configure.ac, dlls/kernel32/tests/sync.c, dlls/ntdll/Makefile.in, dlls/ntdll/critsection.c, -# | dlls/ntdll/esync.c, dlls/ntdll/esync.h, dlls/ntdll/ntdll.spec, dlls/ntdll/ntdll_misc.h, dlls/ntdll/om.c, -# | dlls/ntdll/server.c, dlls/ntdll/sync.c, dlls/ntdll/thread.c, dlls/rpcrt4/rpc_server.c, dlls/user32/hook.c, -# | dlls/wineandroid.drv/window.c, dlls/winemac.drv/macdrv_main.c, dlls/winex11.drv/x11drv_main.c, server/Makefile.in, -# | server/async.c, server/atom.c, server/change.c, server/clipboard.c, server/completion.c, server/console.c, -# | server/debugger.c, server/device.c, server/directory.c, server/esync.c, server/esync.h, server/event.c, server/fd.c, -# | server/file.c, server/file.h, server/handle.c, server/hook.c, server/mailslot.c, server/main.c, server/mapping.c, -# | server/mutex.c, server/named_pipe.c, server/object.h, server/process.c, server/process.h, server/protocol.def, -# | server/queue.c, server/registry.c, server/request.c, server/semaphore.c, server/serial.c, server/signal.c, -# | server/snapshot.c, server/sock.c, server/symlink.c, server/thread.c, server/thread.h, server/timer.c, server/token.c, -# | server/winstation.c +# | dlls/ntdll/esync.c, dlls/ntdll/esync.h, dlls/ntdll/loader.c, dlls/ntdll/ntdll.spec, dlls/ntdll/ntdll_misc.h, +# | dlls/ntdll/om.c, dlls/ntdll/server.c, dlls/ntdll/sync.c, dlls/ntdll/thread.c, dlls/rpcrt4/rpc_server.c, +# | dlls/user32/hook.c, dlls/wineandroid.drv/window.c, dlls/winemac.drv/macdrv_main.c, dlls/winex11.drv/x11drv_main.c, +# | server/Makefile.in, server/async.c, server/atom.c, server/change.c, server/clipboard.c, server/completion.c, +# | server/console.c, server/debugger.c, server/device.c, server/directory.c, server/esync.c, server/esync.h, +# | server/event.c, server/fd.c, server/file.c, server/file.h, server/handle.c, server/hook.c, server/mailslot.c, +# | server/main.c, server/mapping.c, server/mutex.c, server/named_pipe.c, server/object.h, server/process.c, +# | server/process.h, server/protocol.def, server/queue.c, server/registry.c, server/request.c, server/semaphore.c, +# | server/serial.c, server/signal.c, server/snapshot.c, server/sock.c, server/symlink.c, server/thread.c, server/thread.h, +# | server/timer.c, server/token.c, server/winstation.c # | if test "$enable_eventfd_synchronization" -eq 1; then patch_apply eventfd_synchronization/0001-configure-Check-for-sys-eventfd.h-ppoll-and-shm_open.patch @@ -4533,7 +4546,8 @@ fi # Patchset ntdll-Builtin_Prot # | # | This patchset has the following (direct or indirect) dependencies: -# | * ntdll-ThreadTime, ntdll-Hide_Wine_Exports, ntdll-User_Shared_Data +# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, ntdll-ThreadTime, ntdll-Hide_Wine_Exports, +# | ntdll-User_Shared_Data # | # | This patchset fixes the following Wine bugs: # | * [#44650] Fix holes in ELF mappings @@ -4844,7 +4858,8 @@ fi # Patchset ntdll-NtContinue # | # | This patchset has the following (direct or indirect) dependencies: -# | * ntdll-ThreadTime, ntdll-Hide_Wine_Exports, ntdll-User_Shared_Data, winebuild-Fake_Dlls +# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, ntdll-ThreadTime, ntdll-Hide_Wine_Exports, +# | ntdll-User_Shared_Data, winebuild-Fake_Dlls # | # | This patchset fixes the following Wine bugs: # | * [#31910] Add stub for NtContinue @@ -4962,7 +4977,8 @@ fi # Patchset ntdll-WRITECOPY # | # | This patchset has the following (direct or indirect) dependencies: -# | * ntdll-ThreadTime, ntdll-Hide_Wine_Exports, ntdll-User_Shared_Data +# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, ntdll-ThreadTime, ntdll-Hide_Wine_Exports, +# | ntdll-User_Shared_Data # | # | This patchset fixes the following Wine bugs: # | * [#29384] Voobly expects correct handling of WRITECOPY memory protection @@ -4989,7 +5005,8 @@ fi # Patchset ntdll-Signal_Handler # | # | This patchset has the following (direct or indirect) dependencies: -# | * ntdll-ThreadTime, ntdll-Hide_Wine_Exports, ntdll-User_Shared_Data, ntdll-WRITECOPY +# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, ntdll-ThreadTime, ntdll-Hide_Wine_Exports, +# | ntdll-User_Shared_Data, ntdll-WRITECOPY # | # | Modified files: # | * dlls/ntdll/signal_i386.c @@ -7223,6 +7240,9 @@ fi # Patchset wow64cpu-Wow64Transition # | +# | This patchset has the following (direct or indirect) dependencies: +# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level +# | # | This patchset fixes the following Wine bugs: # | * [#45567] League of Legends 8.12+ fails to start a game (anticheat engine, validation of WoW64 syscall dispatcher) # | diff --git a/patches/wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch b/patches/wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch index 26ce6144..7e126948 100644 --- a/patches/wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch +++ b/patches/wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch @@ -1,4 +1,4 @@ -From 3ac1fcd7a2aec193c8146bac8e99e5e66dc79f73 Mon Sep 17 00:00:00 2001 +From 47b34421517920aee7eecd87cc32c4d9a7457cfc Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 8 Aug 2018 20:00:15 -0500 Subject: [PATCH] ntdll: Add a stub implementation of Wow64Transition. @@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Add a stub implementation of Wow64Transition. 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 4bf05305f55..0c74367f53e 100644 +index c2810d50b..1da6b2934 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -4440,19 +4440,21 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) +@@ -4249,18 +4249,20 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) return TRUE; } @@ -28,14 +28,13 @@ index 4bf05305f55..0c74367f53e 100644 's','y','s','t','e','m','3','2','\\', 'k','e','r','n','e','l','3','2','.','d','l','l',0}; RTL_USER_PROCESS_PARAMETERS *params; - static const WCHAR globalflagW[] = {'G','l','o','b','a','l','F','l','a','g',0}; ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION runlevel; - WINE_MODREF *wm; + WINE_MODREF *wm, *wow64cpu_wm; NTSTATUS status; ANSI_STRING func_name; UNICODE_STRING nt_name; -@@ -4496,6 +4498,13 @@ void __wine_process_init(void) +@@ -4299,6 +4301,13 @@ void __wine_process_init(void) MESSAGE( "wine: could not load kernel32.dll, status %x\n", status ); exit(1); } @@ -50,7 +49,7 @@ index 4bf05305f55..0c74367f53e 100644 if ((status = LdrGetProcedureAddress( wm->ldr.BaseAddress, &func_name, 0, (void **)&init_func )) != STATUS_SUCCESS) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index 1c4dbaf94ce..0c3170b789b 100644 +index 5057e2b07..b7a502c62 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -1085,6 +1085,7 @@ @@ -62,5 +61,5 @@ index 1c4dbaf94ce..0c3170b789b 100644 @ stdcall -private ZwAccessCheck(ptr long long ptr ptr ptr ptr ptr) NtAccessCheck @ stdcall -private ZwAccessCheckAndAuditAlarm(ptr long ptr ptr ptr long ptr long ptr ptr ptr) NtAccessCheckAndAuditAlarm -- -2.17.1 +2.23.0 diff --git a/patches/wow64cpu-Wow64Transition/definition b/patches/wow64cpu-Wow64Transition/definition index 64bd449d..2b682bf8 100644 --- a/patches/wow64cpu-Wow64Transition/definition +++ b/patches/wow64cpu-Wow64Transition/definition @@ -1 +1,2 @@ -Fixes: [45567] League of Legends 8.12+ fails to start a game (anticheat engine, validation of WoW64 syscall dispatcher) \ No newline at end of file +Fixes: [45567] League of Legends 8.12+ fails to start a game (anticheat engine, validation of WoW64 syscall dispatcher) +Depends: advapi32-Token_Integrity_Level