diff --git a/patches/advapi32-Token_Integrity_Level/0010-server-Implement-support-for-creating-processes-usin.patch b/patches/advapi32-Token_Integrity_Level/0010-server-Implement-support-for-creating-processes-usin.patch index 519e7061..93bfb0bc 100644 --- a/patches/advapi32-Token_Integrity_Level/0010-server-Implement-support-for-creating-processes-usin.patch +++ b/patches/advapi32-Token_Integrity_Level/0010-server-Implement-support-for-creating-processes-usin.patch @@ -1,4 +1,4 @@ -From 378f910689602e3367cc72a0248f38ab76cea7d3 Mon Sep 17 00:00:00 2001 +From 099905c587744bd3d4830e75d6183a068ac5bbba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 6 Aug 2017 02:08:05 +0200 Subject: [PATCH] server: Implement support for creating processes using a @@ -151,10 +151,10 @@ index 5fc0d8b..b189036 100644 break; default: diff --git a/server/process.c b/server/process.c -index 00462cf..b7c9da3 100644 +index 653e513..2bb49e2 100644 --- a/server/process.c +++ b/server/process.c -@@ -487,7 +487,7 @@ static void start_sigkill_timer( struct process *process ) +@@ -486,7 +486,7 @@ static void start_sigkill_timer( struct process *process ) /* create a new process */ /* if the function fails the fd is closed */ struct process *create_process( int fd, struct thread *parent_thread, int inherit_all, @@ -172,7 +172,7 @@ index 00462cf..b7c9da3 100644 process->affinity = parent->affinity; } if (!process->handles || !process->token) goto error; -@@ -1129,6 +1129,7 @@ DECL_HANDLER(new_process) +@@ -1128,6 +1128,7 @@ DECL_HANDLER(new_process) const struct security_descriptor *sd; const struct object_attributes *objattr = get_req_object_attributes( &sd, &name, NULL ); struct process *process = NULL; @@ -180,7 +180,7 @@ index 00462cf..b7c9da3 100644 struct process *parent = current->process; int socket_fd = thread_get_inflight_fd( current, req->socket_fd ); -@@ -1169,13 +1170,31 @@ DECL_HANDLER(new_process) +@@ -1168,13 +1169,31 @@ DECL_HANDLER(new_process) return; } @@ -213,15 +213,15 @@ index 00462cf..b7c9da3 100644 return; } -@@ -1183,6 +1202,7 @@ DECL_HANDLER(new_process) +@@ -1182,6 +1201,7 @@ DECL_HANDLER(new_process) if (!(info = alloc_object( &startup_info_ops ))) { close( socket_fd ); + if (token) release_object( token ); return; } - info->exe_file = NULL; -@@ -1237,7 +1257,7 @@ DECL_HANDLER(new_process) + info->process = NULL; +@@ -1228,7 +1248,7 @@ DECL_HANDLER(new_process) #undef FIXUP_LEN } @@ -230,7 +230,7 @@ index 00462cf..b7c9da3 100644 process->startup_info = (struct startup_info *)grab_object( info ); -@@ -1295,6 +1315,7 @@ DECL_HANDLER(new_process) +@@ -1290,6 +1310,7 @@ DECL_HANDLER(new_process) reply->handle = alloc_handle_no_access_check( parent, process, req->access, objattr->attributes ); done: @@ -239,10 +239,10 @@ index 00462cf..b7c9da3 100644 release_object( info ); } diff --git a/server/process.h b/server/process.h -index f45a427..65196a9 100644 +index 1128dba..ec44e02 100644 --- a/server/process.h +++ b/server/process.h -@@ -115,7 +115,7 @@ extern unsigned int alloc_ptid( void *ptr ); +@@ -116,7 +116,7 @@ extern unsigned int alloc_ptid( void *ptr ); extern void free_ptid( unsigned int id ); extern void *get_ptid_entry( unsigned int id ); extern struct process *create_process( int fd, struct thread *parent_thread, int inherit_all, @@ -252,7 +252,7 @@ index f45a427..65196a9 100644 extern struct thread *get_process_first_thread( struct process *process ); extern struct process *get_process_from_id( process_id_t id ); diff --git a/server/protocol.def b/server/protocol.def -index 49337ce..a20baf8 100644 +index 2ddc62f..897aa2b 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -743,6 +743,7 @@ struct rawinput_device 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 46d06563..eab1e2ab 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 8ebb22fe5f693288dd36dca0aa911164385b6e77 Mon Sep 17 00:00:00 2001 +From 62a2aa4ae486d307eb3616bf715924983c6d3458 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 037c01e..369d48b 100644 +index e7a1a43..7528098 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -29,6 +29,7 @@ @@ -21,7 +21,7 @@ index 037c01e..369d48b 100644 #include "wine/test.h" #include "delayloadhandler.h" -@@ -3573,6 +3574,79 @@ static void test_InMemoryOrderModuleList(void) +@@ -3600,6 +3601,79 @@ static void test_InMemoryOrderModuleList(void) ok(entry2 == mark2, "expected entry2 == mark2, got %p and %p\n", entry2, mark2); } @@ -101,17 +101,17 @@ index 037c01e..369d48b 100644 START_TEST(loader) { int argc; -@@ -3637,4 +3711,5 @@ START_TEST(loader) +@@ -3664,4 +3738,5 @@ START_TEST(loader) test_import_resolution(); test_ExitProcess(); test_InMemoryOrderModuleList(); + test_HashLinks(); } diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index c24fa95..246bc0b 100644 +index da83b27..9493770 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -96,6 +96,9 @@ static const char * const reason_names[] = +@@ -93,6 +93,9 @@ static const char * const reason_names[] = static const WCHAR dllW[] = {'.','d','l','l',0}; @@ -121,7 +121,7 @@ index c24fa95..246bc0b 100644 /* internal representation of 32bit modules. per process. */ typedef struct _wine_modref { -@@ -382,6 +385,52 @@ static void call_ldr_notifications( ULONG reason, LDR_MODULE *module ) +@@ -376,6 +379,52 @@ static void call_ldr_notifications( ULONG reason, LDR_MODULE *module ) } /************************************************************************* @@ -174,7 +174,7 @@ index c24fa95..246bc0b 100644 * get_modref * * Looks for the referenced HMODULE in the current process -@@ -1100,7 +1149,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, LPCWSTR filename, LPCWSTR fak +@@ -1094,7 +1143,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, LPCWSTR filename ) &wm->ldr.InLoadOrderModuleList); InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderModuleList); @@ -187,7 +187,7 @@ index c24fa95..246bc0b 100644 if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT)) { -@@ -1864,6 +1918,7 @@ static void load_builtin_callback( void *module, const char *filename ) +@@ -1768,6 +1822,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 c24fa95..246bc0b 100644 /* FIXME: free the modref */ builtin_load_info->status = STATUS_DLL_NOT_FOUND; return; -@@ -2124,6 +2179,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, LPCWSTR fakemo +@@ -2028,6 +2083,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file, /* 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 c24fa95..246bc0b 100644 /* FIXME: there are several more dangling references * left. Including dlls loaded by this dll before the -@@ -3299,6 +3355,7 @@ static void free_modref( WINE_MODREF *wm ) +@@ -3030,6 +3086,7 @@ static void free_modref( WINE_MODREF *wm ) { RemoveEntryList(&wm->ldr.InLoadOrderModuleList); RemoveEntryList(&wm->ldr.InMemoryOrderModuleList); @@ -211,7 +211,7 @@ index c24fa95..246bc0b 100644 if (wm->ldr.InInitializationOrderModuleList.Flink) RemoveEntryList(&wm->ldr.InInitializationOrderModuleList); -@@ -3696,6 +3753,9 @@ void WINAPI LdrInitializeThunk( void *kernel_start, ULONG_PTR unknown2, +@@ -3357,6 +3414,9 @@ void WINAPI LdrInitializeThunk( void *kernel_start, ULONG_PTR unknown2, RemoveEntryList( &wm->ldr.InMemoryOrderModuleList ); InsertHeadList( &peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderModuleList ); @@ -221,15 +221,15 @@ index c24fa95..246bc0b 100644 if ((status = virtual_alloc_thread_stack( NtCurrentTeb(), 0, 0, NULL )) != STATUS_SUCCESS) { ERR( "Main exe initialization for %s failed, status %x\n", -@@ -3842,6 +3902,7 @@ void __wine_process_init(void) +@@ -3505,6 +3565,7 @@ void __wine_process_init(void) NTSTATUS status; ANSI_STRING func_name; void (* DECLSPEC_NORETURN CDECL init_func)(void); + DWORD i; - main_exe_file = thread_init(); + thread_init(); -@@ -3851,6 +3912,10 @@ void __wine_process_init(void) +@@ -3514,6 +3575,10 @@ void __wine_process_init(void) load_global_options(); @@ -241,10 +241,10 @@ index c24fa95..246bc0b 100644 wine_dll_set_callback( load_builtin_callback ); diff --git a/include/winternl.h b/include/winternl.h -index 558f643..737e7f1 100644 +index c07cdec..4f04a28 100644 --- a/include/winternl.h +++ b/include/winternl.h -@@ -2171,8 +2171,7 @@ typedef struct _LDR_MODULE +@@ -2192,8 +2192,7 @@ typedef struct _LDR_MODULE ULONG Flags; SHORT LoadCount; SHORT TlsIndex; @@ -254,7 +254,7 @@ index 558f643..737e7f1 100644 ULONG TimeDateStamp; HANDLE ActivationContext; PVOID PatchInformation; -@@ -2182,6 +2181,9 @@ typedef struct _LDR_MODULE +@@ -2203,6 +2202,9 @@ typedef struct _LDR_MODULE PVOID ContextInformation; ULONG_PTR OriginalBase; LARGE_INTEGER LoadTime; @@ -265,5 +265,5 @@ index 558f643..737e7f1 100644 typedef struct _LDR_DLL_LOADED_NOTIFICATION_DATA -- -1.9.1 +2.7.4 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 c3313283..65f5258c 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 109913dae53f4f0f62166d982a599456a8bd48b3 Mon Sep 17 00:00:00 2001 +From 49c61feeae4cc2c5a0a4c6a6e0aa8bd5b6ef3f46 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 @@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Move code to update user shared data into a separate 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index 3855347..c223f45 100644 +index 5e7c463..a339562 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec -@@ -1501,3 +1501,6 @@ +@@ -1509,3 +1509,6 @@ # Filesystem @ cdecl wine_nt_to_unix_file_name(ptr ptr long long) @ cdecl wine_unix_to_nt_file_name(ptr ptr) @@ -21,10 +21,10 @@ index 3855347..c223f45 100644 +# User shared data +@ cdecl __wine_user_shared_data() diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c -index b1d04ab..ff14a5e 100644 +index f1fff59..45bfb14 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c -@@ -352,6 +352,26 @@ static ULONG_PTR get_image_addr(void) +@@ -350,6 +350,26 @@ static ULONG_PTR get_image_addr(void) } #endif @@ -51,15 +51,15 @@ index b1d04ab..ff14a5e 100644 /*********************************************************************** * thread_init * -@@ -366,7 +386,6 @@ HANDLE thread_init(void) +@@ -363,7 +383,6 @@ void thread_init(void) + void *addr; BOOL suspend; SIZE_T size, info_size; - HANDLE exe_file = 0; - LARGE_INTEGER now; NTSTATUS status; struct ntdll_thread_data *thread_data; static struct debug_info debug_info; /* debug info for initial thread */ -@@ -479,15 +498,8 @@ HANDLE thread_init(void) +@@ -475,15 +494,8 @@ void thread_init(void) wine_server_fd_to_handle( 2, GENERIC_WRITE|SYNCHRONIZE, OBJ_INHERIT, ¶ms.hStdError ); } @@ -78,5 +78,5 @@ index b1d04ab..ff14a5e 100644 NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 ); -- -1.9.1 +2.7.4 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 06ad6da3..0868ca5a 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "b1a3b9e5ce74990777fca94658833802cb7b7a09" + echo "52fecef1a237368eee84ebc9b366107ee2509562" } # Show version information