From eba1e9b28a07fea4f8233462a0154f44056128a3 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Sat, 6 Jul 2019 12:41:27 +1000 Subject: [PATCH] Rebase against 8c34add3bd747d8ff267974de67880b7eb50bc8d --- ...-support-for-creating-processes-usin.patch | 62 +++++++++---------- ...entfd-file-descriptors-for-thread-ob.patch | 18 +++--- ...rver-ntdll-Implement-alertable-waits.patch | 38 ++++++------ ...-mscoree-Implement-_CorValidateImage.patch | 16 +++-- patches/patchinstall.sh | 2 +- ...rite-DiskSpaceList-logic-using-lists.patch | 27 ++++---- ...pi-Implement-SetupAddToDiskSpaceList.patch | 2 +- ...ment-SetupQueryDrivesInDiskSpaceList.patch | 6 +- ...lementSetupAddSectionToDiskSpaceList.patch | 10 +-- ...eate-HardwareId-registry-key-for-dis.patch | 2 +- ...ameters-of-SPFILENOTIFY_FILEINCABINE.patch | 20 +++--- ...port-for-IDF_CHECKFIRST-flag-in-Setu.patch | 10 +-- ...a-drive-serial-number-during-prefix-.patch | 16 ++--- ...itialize-proxy-settings-registry-key.patch | 20 +++--- ...stem32-drivers-etc-host-networks-pro.patch | 22 +++---- ...glReadPixels-for-RT-texture-download.patch | 48 +++++++------- ...rt-ole32-msacm32-to-workaround-bug-w.patch | 14 ++--- 17 files changed, 165 insertions(+), 168 deletions(-) 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 cc3a1732..8ed86c84 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 e571cdf9236e083f196c09d0fc96ed7c98fae440 Mon Sep 17 00:00:00 2001 +From 9f35230848f29e79b65c8e340221d7eb81382a43 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 @@ -15,10 +15,10 @@ Subject: [PATCH] server: Implement support for creating processes using a 7 files changed, 66 insertions(+), 18 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c -index bb6cc3e..7b202db 100644 +index 802d99f2a12..03c0588d59a 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c -@@ -2289,7 +2289,7 @@ static BOOL replace_process( HANDLE handle, const RTL_USER_PROCESS_PARAMETERS *p +@@ -2341,7 +2341,7 @@ static BOOL replace_process( HANDLE handle, const RTL_USER_PROCESS_PARAMETERS *p * Create a new process. If hFile is a valid handle we have an exe * file, otherwise it is a Winelib app. */ @@ -27,7 +27,7 @@ index bb6cc3e..7b202db 100644 BOOL inherit, DWORD flags, const RTL_USER_PROCESS_PARAMETERS *params, LPPROCESS_INFORMATION info, LPCSTR unixdir, const pe_image_info_t *pe_info ) { -@@ -2356,6 +2356,7 @@ static BOOL create_process( HANDLE hFile, LPSECURITY_ATTRIBUTES psa, LPSECURITY_ +@@ -2408,6 +2408,7 @@ static BOOL create_process( HANDLE hFile, LPSECURITY_ATTRIBUTES psa, LPSECURITY_ req->access = PROCESS_ALL_ACCESS; req->cpu = pe_info->cpu; req->info_size = startup_info_size; @@ -35,7 +35,7 @@ index bb6cc3e..7b202db 100644 wine_server_add_data( req, objattr, attr_len ); wine_server_add_data( req, startup_info, startup_info_size ); wine_server_add_data( req, params->Environment, (env_end - params->Environment) * sizeof(WCHAR) ); -@@ -2526,7 +2527,7 @@ static RTL_USER_PROCESS_PARAMETERS *get_vdm_params( const RTL_USER_PROCESS_PARAM +@@ -2567,7 +2568,7 @@ static RTL_USER_PROCESS_PARAMETERS *get_vdm_params( const RTL_USER_PROCESS_PARAM * * Create a new VDM process for a 16-bit or DOS application. */ @@ -44,7 +44,7 @@ index bb6cc3e..7b202db 100644 BOOL inherit, DWORD flags, const RTL_USER_PROCESS_PARAMETERS *params, LPPROCESS_INFORMATION info, LPCSTR unixdir ) { -@@ -2536,7 +2537,7 @@ static BOOL create_vdm_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES +@@ -2577,7 +2578,7 @@ static BOOL create_vdm_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES if (!(new_params = get_vdm_params( params, &pe_info ))) return FALSE; @@ -53,7 +53,7 @@ index bb6cc3e..7b202db 100644 RtlDestroyProcessParameters( new_params ); return ret; } -@@ -2547,7 +2548,7 @@ static BOOL create_vdm_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES +@@ -2588,7 +2589,7 @@ static BOOL create_vdm_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES * * Create a new cmd shell process for a .BAT file. */ @@ -62,7 +62,7 @@ index bb6cc3e..7b202db 100644 BOOL inherit, DWORD flags, LPSTARTUPINFOW startup, const RTL_USER_PROCESS_PARAMETERS *params, LPPROCESS_INFORMATION info ) -@@ -2577,9 +2578,9 @@ static BOOL create_cmd_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES +@@ -2618,9 +2619,9 @@ static BOOL create_cmd_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES strcatW( newcmdline, params->CommandLine.Buffer ); strcatW( newcmdline, quotW ); if (params->CurrentDirectory.DosPath.Length) cur_dir = params->CurrentDirectory.DosPath.Buffer; @@ -74,7 +74,7 @@ index bb6cc3e..7b202db 100644 HeapFree( GetProcessHeap(), 0, newcmdline ); return ret; } -@@ -2692,7 +2693,9 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l +@@ -2734,7 +2735,9 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l TRACE("app %s cmdline %s\n", debugstr_w(app_name), debugstr_w(cmd_line) ); @@ -85,7 +85,7 @@ index bb6cc3e..7b202db 100644 if (new_token) FIXME("No support for returning created process token\n"); if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, ARRAY_SIZE( name ), &hFile, &is_64bit ))) -@@ -2760,17 +2763,17 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l +@@ -2802,17 +2805,17 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l debugstr_w(name), is_64bit_arch(pe_info.cpu) ? 64 : 32, wine_dbgstr_longlong(pe_info.base), wine_dbgstr_longlong(pe_info.base + pe_info.map_size), cpu_names[pe_info.cpu] ); @@ -106,7 +106,7 @@ index bb6cc3e..7b202db 100644 inherit, flags, params, info, unixdir, &pe_info ); break; case BINARY_UNKNOWN: -@@ -2780,14 +2783,14 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l +@@ -2822,14 +2825,14 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l if (!strcmpiW( p, comW ) || !strcmpiW( p, pifW )) { TRACE( "starting %s as DOS binary\n", debugstr_w(name) ); @@ -124,10 +124,10 @@ index bb6cc3e..7b202db 100644 break; } diff --git a/server/process.c b/server/process.c -index af2ba3d..57bf0ec 100644 +index 30832f474da..028ffa1b454 100644 --- a/server/process.c +++ b/server/process.c -@@ -486,7 +486,7 @@ static void start_sigkill_timer( struct process *process ) +@@ -491,7 +491,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 process *parent, int inherit_all, @@ -136,7 +136,7 @@ index af2ba3d..57bf0ec 100644 { struct process *process; -@@ -561,7 +561,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all, +@@ -567,7 +567,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all, : alloc_handle_table( process, 0 ); /* Note: for security reasons, starting a new process does not attempt * to use the current impersonation token for the new process */ @@ -145,7 +145,7 @@ index af2ba3d..57bf0ec 100644 process->affinity = parent->affinity; } if (!process->handles || !process->token) goto error; -@@ -1127,6 +1127,7 @@ DECL_HANDLER(new_process) +@@ -1123,6 +1123,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; @@ -153,7 +153,7 @@ index af2ba3d..57bf0ec 100644 struct process *parent = current->process; int socket_fd = thread_get_inflight_fd( current, req->socket_fd ); -@@ -1167,10 +1168,39 @@ DECL_HANDLER(new_process) +@@ -1163,10 +1164,39 @@ DECL_HANDLER(new_process) return; } @@ -193,7 +193,7 @@ index af2ba3d..57bf0ec 100644 return; } info->process = NULL; -@@ -1217,7 +1247,7 @@ DECL_HANDLER(new_process) +@@ -1213,7 +1243,7 @@ DECL_HANDLER(new_process) #undef FIXUP_LEN } @@ -202,7 +202,7 @@ index af2ba3d..57bf0ec 100644 process->startup_info = (struct startup_info *)grab_object( info ); -@@ -1279,6 +1309,7 @@ DECL_HANDLER(new_process) +@@ -1275,6 +1305,7 @@ DECL_HANDLER(new_process) reply->handle = alloc_handle_no_access_check( parent, process, req->access, objattr->attributes ); done: @@ -210,7 +210,7 @@ index af2ba3d..57bf0ec 100644 if (process) release_object( process ); release_object( info ); } -@@ -1311,7 +1342,7 @@ DECL_HANDLER(exec_process) +@@ -1307,7 +1338,7 @@ DECL_HANDLER(exec_process) close( socket_fd ); return; } @@ -220,10 +220,10 @@ index af2ba3d..57bf0ec 100644 release_object( process ); } diff --git a/server/process.h b/server/process.h -index 029b328..ea28091 100644 +index f21ab7722a9..774c147e783 100644 --- a/server/process.h +++ b/server/process.h -@@ -116,7 +116,7 @@ extern unsigned int alloc_ptid( void *ptr ); +@@ -117,7 +117,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 process *parent, int inherit_all, @@ -233,22 +233,22 @@ index 029b328..ea28091 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 607644e..1b5e6de 100644 +index fcca1d255ba..4b01c6d1904 100644 --- a/server/protocol.def +++ b/server/protocol.def -@@ -744,6 +744,7 @@ struct rawinput_device +@@ -790,6 +790,7 @@ struct rawinput_device unsigned int access; /* access rights for process object */ - cpu_type_t cpu; /* CPU that the new process will use */ + client_cpu_t cpu; /* CPU that the new process will use */ data_size_t info_size; /* size of startup info */ + obj_handle_t token; /* token for the new process */ VARARG(objattr,object_attributes); /* object attributes */ VARARG(info,startup_info,info_size); /* startup information */ VARARG(env,unicode_str); /* environment for new process */ diff --git a/server/request.c b/server/request.c -index c10c4e6..86f293f 100644 +index d2adb08a183..139d643e8c8 100644 --- a/server/request.c +++ b/server/request.c -@@ -577,7 +577,7 @@ static void master_socket_poll_event( struct fd *fd, int event ) +@@ -578,7 +578,7 @@ static void master_socket_poll_event( struct fd *fd, int event ) int client = accept( get_unix_fd( master_socket->fd ), (struct sockaddr *) &dummy, &len ); if (client == -1) return; fcntl( client, F_SETFL, O_NONBLOCK ); @@ -258,7 +258,7 @@ index c10c4e6..86f293f 100644 create_thread( -1, process, NULL ); release_object( process ); diff --git a/server/security.h b/server/security.h -index 21e90cc..32dfe5f 100644 +index 21e90ccf23f..32dfe5f8db9 100644 --- a/server/security.h +++ b/server/security.h @@ -67,6 +67,8 @@ extern const ACL *token_get_default_dacl( struct token *token ); @@ -271,10 +271,10 @@ index 21e90cc..32dfe5f 100644 static inline const ACE_HEADER *ace_next( const ACE_HEADER *ace ) { diff --git a/server/token.c b/server/token.c -index 1184241..5db97b4 100644 +index 181219d2179..858ec25d792 100644 --- a/server/token.c +++ b/server/token.c -@@ -836,6 +836,12 @@ int token_assign_label( struct token *token, PSID label ) +@@ -845,6 +845,12 @@ int token_assign_label( struct token *token, PSID label ) return ret; } @@ -287,7 +287,7 @@ index 1184241..5db97b4 100644 struct token *token_create_admin( void ) { struct token *token = NULL; -@@ -1262,6 +1268,11 @@ const SID *token_get_primary_group( struct token *token ) +@@ -1271,6 +1277,11 @@ const SID *token_get_primary_group( struct token *token ) return token->primary_group; } @@ -300,5 +300,5 @@ index 1184241..5db97b4 100644 { GENERIC_MAPPING mapping; -- -1.9.1 +2.20.1 diff --git a/patches/eventfd_synchronization/0020-server-Create-eventfd-file-descriptors-for-thread-ob.patch b/patches/eventfd_synchronization/0020-server-Create-eventfd-file-descriptors-for-thread-ob.patch index 202afd65..41ca4dcd 100644 --- a/patches/eventfd_synchronization/0020-server-Create-eventfd-file-descriptors-for-thread-ob.patch +++ b/patches/eventfd_synchronization/0020-server-Create-eventfd-file-descriptors-for-thread-ob.patch @@ -1,4 +1,4 @@ -From f3bcb0b64f7960dad656347dadb56be9b3afe262 Mon Sep 17 00:00:00 2001 +From e13e9f7a5403d5aa7598bd788d9566ce445d3d67 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Fri, 8 Jun 2018 22:04:29 -0500 Subject: [PATCH] server: Create eventfd file descriptors for thread objects. @@ -9,7 +9,7 @@ Subject: [PATCH] server: Create eventfd file descriptors for thread objects. 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/server/thread.c b/server/thread.c -index 85349475c..35bddeeaa 100644 +index a7dcf1088af..1bd09ff4810 100644 --- a/server/thread.c +++ b/server/thread.c @@ -133,6 +133,7 @@ static const struct object_ops thread_apc_ops = @@ -36,8 +36,8 @@ index 85349475c..35bddeeaa 100644 + thread->esync_fd = -1; thread->debug_ctx = NULL; thread->debug_event = NULL; - thread->debug_break = 0; -@@ -294,6 +296,9 @@ struct thread *create_thread( int fd, struct process *process, const struct secu + thread->system_regs = 0; +@@ -293,6 +295,9 @@ struct thread *create_thread( int fd, struct process *process, const struct secu return NULL; } @@ -47,7 +47,7 @@ index 85349475c..35bddeeaa 100644 set_fd_events( thread->request_fd, POLLIN ); /* start listening to events */ add_process_thread( thread->process, thread ); return thread; -@@ -372,6 +377,9 @@ static void destroy_thread( struct object *obj ) +@@ -371,6 +376,9 @@ static void destroy_thread( struct object *obj ) if (thread->exit_poll) remove_timeout_user( thread->exit_poll ); if (thread->id) free_ptid( thread->id ); if (thread->token) release_object( thread->token ); @@ -57,7 +57,7 @@ index 85349475c..35bddeeaa 100644 } /* dump a thread on stdout for debugging purposes */ -@@ -397,6 +405,12 @@ static int thread_signaled( struct object *obj, struct wait_queue_entry *entry ) +@@ -396,6 +404,12 @@ static int thread_signaled( struct object *obj, struct wait_queue_entry *entry ) return mythread->state == TERMINATED && !mythread->exit_poll; } @@ -71,7 +71,7 @@ index 85349475c..35bddeeaa 100644 { if (access & GENERIC_READ) access |= STANDARD_RIGHTS_READ | THREAD_QUERY_INFORMATION | THREAD_GET_CONTEXT; diff --git a/server/thread.h b/server/thread.h -index fa4ced546..46064cb4a 100644 +index d2b511145b9..29bf6b51359 100644 --- a/server/thread.h +++ b/server/thread.h @@ -54,6 +54,7 @@ struct thread @@ -81,7 +81,7 @@ index fa4ced546..46064cb4a 100644 + int esync_fd; /* esync file descriptor (signalled on exit) */ struct debug_ctx *debug_ctx; /* debugger context if this thread is a debugger */ struct debug_event *debug_event; /* debug event being sent to debugger */ - int debug_break; /* debug breakpoint pending? */ + unsigned int system_regs; /* which system regs have been set */ -- -2.21.0 +2.20.1 diff --git a/patches/eventfd_synchronization/0045-server-ntdll-Implement-alertable-waits.patch b/patches/eventfd_synchronization/0045-server-ntdll-Implement-alertable-waits.patch index 68d76452..628353d1 100644 --- a/patches/eventfd_synchronization/0045-server-ntdll-Implement-alertable-waits.patch +++ b/patches/eventfd_synchronization/0045-server-ntdll-Implement-alertable-waits.patch @@ -1,4 +1,4 @@ -From 216028748c99e8ea03c913b7885e2e97c6c0fbca Mon Sep 17 00:00:00 2001 +From 241237ce6d96ac33915e002518b550d41baaf413 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Fri, 15 Jun 2018 14:12:22 -0500 Subject: [PATCH] server, ntdll: Implement alertable waits. @@ -16,7 +16,7 @@ We do this quite simply by waiting on an extra eventfd descriptor, which the ser 8 files changed, 121 insertions(+), 17 deletions(-) diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c -index 119a36f36..8a41f6961 100644 +index 119a36f3611..8a41f6961f9 100644 --- a/dlls/ntdll/esync.c +++ b/dlls/ntdll/esync.c @@ -684,19 +684,43 @@ static int do_poll( struct pollfd *fds, nfds_t nfds, ULONGLONG *end ) @@ -196,10 +196,10 @@ index 119a36f36..8a41f6961 100644 NTSTATUS esync_signal_and_wait( HANDLE signal, HANDLE wait, BOOLEAN alertable, diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index 951c9b7f9..5574e24fd 100644 +index 31714f90516..009dd33ede0 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -241,6 +241,7 @@ struct ntdll_thread_data +@@ -239,6 +239,7 @@ struct ntdll_thread_data { struct debug_info *debug_info; /* info for debugstr functions */ int esync_queue_fd;/* fd to wait on for driver events */ @@ -208,10 +208,10 @@ index 951c9b7f9..5574e24fd 100644 int request_fd; /* fd for sending server requests */ int reply_fd; /* fd for receiving server replies */ diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c -index 1d55162a6..dd553a864 100644 +index 95c175aa7fe..711505242c0 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c -@@ -319,6 +319,7 @@ void thread_init(void) +@@ -328,6 +328,7 @@ void thread_init(void) thread_data->wait_fd[0] = -1; thread_data->wait_fd[1] = -1; thread_data->esync_queue_fd = -1; @@ -219,7 +219,7 @@ index 1d55162a6..dd553a864 100644 signal_init_thread( teb ); virtual_init_threading(); -@@ -691,6 +692,7 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle_ptr, ACCESS_MASK access, OBJECT +@@ -706,6 +707,7 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle_ptr, ACCESS_MASK access, OBJECT thread_data->wait_fd[1] = -1; thread_data->start_stack = (char *)teb->Tib.StackBase; thread_data->esync_queue_fd = -1; @@ -228,7 +228,7 @@ index 1d55162a6..dd553a864 100644 pthread_attr_init( &pthread_attr ); pthread_attr_setstack( &pthread_attr, teb->DeallocationStack, diff --git a/server/esync.c b/server/esync.c -index 5ef4dd282..4fb42e6f9 100644 +index 5ef4dd282ee..4fb42e6f9d2 100644 --- a/server/esync.c +++ b/server/esync.c @@ -247,19 +247,25 @@ int esync_create_fd( int initval, int flags ) @@ -272,7 +272,7 @@ index 5ef4dd282..4fb42e6f9 100644 + send_client_fd( current->process, current->esync_apc_fd, current->id ); +} diff --git a/server/esync.h b/server/esync.h -index aeb58c546..cea025d93 100644 +index aeb58c5469c..cea025d9308 100644 --- a/server/esync.h +++ b/server/esync.h @@ -21,6 +21,7 @@ @@ -284,10 +284,10 @@ index aeb58c546..cea025d93 100644 void esync_clear( int fd ); diff --git a/server/protocol.def b/server/protocol.def -index 4002ee642..ce165b71b 100644 +index 65a6696e38f..d577edc0e02 100644 --- a/server/protocol.def +++ b/server/protocol.def -@@ -4032,6 +4032,11 @@ struct handle_info +@@ -4054,6 +4054,11 @@ struct handle_info unsigned int shm_idx; /* this object's index into the shm section */ @END @@ -300,7 +300,7 @@ index 4002ee642..ce165b71b 100644 { ESYNC_SEMAPHORE = 1, diff --git a/server/thread.c b/server/thread.c -index 7c8ff1d5d..0e02630b9 100644 +index 9a014b15459..4b4e342243c 100644 --- a/server/thread.c +++ b/server/thread.c @@ -188,6 +188,7 @@ static inline void init_thread_structure( struct thread *thread ) @@ -310,8 +310,8 @@ index 7c8ff1d5d..0e02630b9 100644 + thread->esync_apc_fd = -1; thread->debug_ctx = NULL; thread->debug_event = NULL; - thread->debug_break = 0; -@@ -297,7 +298,10 @@ struct thread *create_thread( int fd, struct process *process, const struct secu + thread->system_regs = 0; +@@ -296,7 +297,10 @@ struct thread *create_thread( int fd, struct process *process, const struct secu } if (do_esync()) @@ -322,7 +322,7 @@ index 7c8ff1d5d..0e02630b9 100644 set_fd_events( thread->request_fd, POLLIN ); /* start listening to events */ add_process_thread( thread->process, thread ); -@@ -1052,8 +1056,13 @@ static int queue_apc( struct process *process, struct thread *thread, struct thr +@@ -1051,8 +1055,13 @@ static int queue_apc( struct process *process, struct thread *thread, struct thr grab_object( apc ); list_add_tail( queue, &apc->entry ); if (!list_prev( queue, &apc->entry )) /* first one */ @@ -336,7 +336,7 @@ index 7c8ff1d5d..0e02630b9 100644 return 1; } -@@ -1100,6 +1109,10 @@ static struct thread_apc *thread_dequeue_apc( struct thread *thread, int system_ +@@ -1099,6 +1108,10 @@ static struct thread_apc *thread_dequeue_apc( struct thread *thread, int system_ apc = LIST_ENTRY( ptr, struct thread_apc, entry ); list_remove( ptr ); } @@ -348,7 +348,7 @@ index 7c8ff1d5d..0e02630b9 100644 } diff --git a/server/thread.h b/server/thread.h -index 46064cb4a..36ccb9207 100644 +index 29bf6b51359..620f8aa9c81 100644 --- a/server/thread.h +++ b/server/thread.h @@ -55,6 +55,7 @@ struct thread @@ -358,7 +358,7 @@ index 46064cb4a..36ccb9207 100644 + int esync_apc_fd; /* esync apc fd (signalled when APCs are present) */ struct debug_ctx *debug_ctx; /* debugger context if this thread is a debugger */ struct debug_event *debug_event; /* debug event being sent to debugger */ - int debug_break; /* debug breakpoint pending? */ + unsigned int system_regs; /* which system regs have been set */ -- -2.21.0 +2.20.1 diff --git a/patches/mscoree-CorValidateImage/0001-mscoree-Implement-_CorValidateImage.patch b/patches/mscoree-CorValidateImage/0001-mscoree-Implement-_CorValidateImage.patch index 7bc89821..d72a69af 100644 --- a/patches/mscoree-CorValidateImage/0001-mscoree-Implement-_CorValidateImage.patch +++ b/patches/mscoree-CorValidateImage/0001-mscoree-Implement-_CorValidateImage.patch @@ -1,34 +1,32 @@ -From d7d0e1917534ef784bb37b4c5dbbca58c9d8a300 Mon Sep 17 00:00:00 2001 +From 8a8068b5527ed4ab069a85a2d338454f4a58b887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Tue, 25 Aug 2015 11:31:34 +0200 -Subject: mscoree: Implement semi-stub for _CorValidateImage. +Subject: [PATCH] mscoree: Implement semi-stub for _CorValidateImage. This is required in order to implement "proper" loader support for .NET executables. (Yes, its intentional that both NTSTATUS and HRESULT values are returned, don't ask...) --- - dlls/mscoree/mscoree_main.c | 75 +++++++++++++++++++++++++++++++++++++++++++-- + dlls/mscoree/mscoree_main.c | 75 ++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 2 deletions(-) diff --git a/dlls/mscoree/mscoree_main.c b/dlls/mscoree/mscoree_main.c -index 8b46fd5..8ec8ffe 100644 +index 15bbc235207..cef566e49be 100644 --- a/dlls/mscoree/mscoree_main.c +++ b/dlls/mscoree/mscoree_main.c -@@ -21,11 +21,14 @@ +@@ -21,9 +21,12 @@ #include +#include "ntstatus.h" +#define WIN32_NO_STATUS #define COBJMACROS - #include "wine/unicode.h" - #include "wine/library.h" #include "windef.h" #include "winbase.h" +#include "winternl.h" #include "winuser.h" #include "winnls.h" #include "winreg.h" -@@ -259,8 +262,76 @@ VOID WINAPI _CorImageUnloading(PVOID imageBase) +@@ -258,8 +261,76 @@ VOID WINAPI _CorImageUnloading(PVOID imageBase) HRESULT WINAPI _CorValidateImage(PVOID* imageBase, LPCWSTR imageName) { @@ -108,5 +106,5 @@ index 8b46fd5..8ec8ffe 100644 HRESULT WINAPI GetCORSystemDirectory(LPWSTR pbuffer, DWORD cchBuffer, DWORD *dwLength) -- -2.5.0 +2.20.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index ee057eb5..89a99f74 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "201d13a3c31131f204f89d61be37bf75d58dc6dd" + echo "8c34add3bd747d8ff267974de67880b7eb50bc8d" } # Show version information diff --git a/patches/setupapi-DiskSpaceList/0001-setupapi-Rewrite-DiskSpaceList-logic-using-lists.patch b/patches/setupapi-DiskSpaceList/0001-setupapi-Rewrite-DiskSpaceList-logic-using-lists.patch index 1e7ea2e1..7dd6f54b 100644 --- a/patches/setupapi-DiskSpaceList/0001-setupapi-Rewrite-DiskSpaceList-logic-using-lists.patch +++ b/patches/setupapi-DiskSpaceList/0001-setupapi-Rewrite-DiskSpaceList-logic-using-lists.patch @@ -1,14 +1,14 @@ -From b83937f062380afb686fe503fe72c0d96a9843f4 Mon Sep 17 00:00:00 2001 +From 18a06bed97bbc5a3821d91d112826bd0cf09daf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 3 Mar 2016 04:52:35 +0100 -Subject: setupapi: Rewrite DiskSpaceList logic using lists. +Subject: [PATCH] setupapi: Rewrite DiskSpaceList logic using lists. --- - dlls/setupapi/diskspace.c | 184 +++++++++++++++++++++++++--------------------- - 1 file changed, 102 insertions(+), 82 deletions(-) + dlls/setupapi/diskspace.c | 183 +++++++++++++++++++++----------------- + 1 file changed, 101 insertions(+), 82 deletions(-) diff --git a/dlls/setupapi/diskspace.c b/dlls/setupapi/diskspace.c -index 1ca45f9..7c33542 100644 +index f5e79d5327..4f047dd2b5 100644 --- a/dlls/setupapi/diskspace.c +++ b/dlls/setupapi/diskspace.c @@ -1,6 +1,7 @@ @@ -19,11 +19,10 @@ index 1ca45f9..7c33542 100644 * Copyright 2004 CodeWeavers (Aric Stewart) * * This library is free software; you can redistribute it and/or -@@ -27,69 +28,51 @@ +@@ -27,69 +28,50 @@ #include "winnls.h" #include "winreg.h" #include "setupapi.h" -+#include "wine/unicode.h" +#include "wine/list.h" #include "wine/debug.h" +#include "setupapi_private.h" @@ -114,7 +113,7 @@ index 1ca45f9..7c33542 100644 return list; } -@@ -105,32 +88,58 @@ HDSKSPC WINAPI SetupCreateDiskSpaceListA(PVOID Reserved1, DWORD Reserved2, UINT +@@ -105,32 +87,58 @@ HDSKSPC WINAPI SetupCreateDiskSpaceListA(PVOID Reserved1, DWORD Reserved2, UINT /*********************************************************************** * SetupDuplicateDiskSpaceListW (SETUPAPI.@) */ @@ -179,7 +178,7 @@ index 1ca45f9..7c33542 100644 } /*********************************************************************** -@@ -155,55 +164,51 @@ BOOL WINAPI SetupAddInstallSectionToDiskSpaceListA(HDSKSPC DiskSpace, +@@ -155,55 +163,51 @@ BOOL WINAPI SetupAddInstallSectionToDiskSpaceListA(HDSKSPC DiskSpace, /*********************************************************************** * SetupQuerySpaceRequiredOnDriveW (SETUPAPI.@) */ @@ -231,11 +230,11 @@ index 1ca45f9..7c33542 100644 - TRACE("Looking for drive %s\n",debugstr_w(driveW)); - - for (i = 0; i < list->dwDriveCount; i++) -+ if (tolowerW(drivespec[0]) < 'a' || tolowerW(drivespec[0]) > 'z' || ++ if (towlower(drivespec[0]) < 'a' || towlower(drivespec[0]) > 'z' || + drivespec[1] != ':' || drivespec[2] != 0) { - TRACE("checking drive %s\n",debugstr_w(list->Drives[i].lpzName)); -- if (lstrcmpW(driveW,list->Drives[i].lpzName)==0) +- if (wcscmp(driveW,list->Drives[i].lpzName)==0) - { - rc = TRUE; - *SpaceRequired = list->Drives[i].dwWantedSpace; @@ -249,7 +248,7 @@ index 1ca45f9..7c33542 100644 - HeapFree(GetProcessHeap(), 0, driveW); + LIST_FOR_EACH_ENTRY(file, &list->files, struct file_entry, entry) + { -+ if (tolowerW(file->path[0]) == tolowerW(drivespec[0]) && ++ if (towlower(file->path[0]) == towlower(drivespec[0]) && + file->path[1] == ':' && file->path[2] == '\\') + sum += file->size; + } @@ -261,7 +260,7 @@ index 1ca45f9..7c33542 100644 } /*********************************************************************** -@@ -253,10 +258,25 @@ BOOL WINAPI SetupQuerySpaceRequiredOnDriveA(HDSKSPC DiskSpace, +@@ -253,10 +257,25 @@ BOOL WINAPI SetupQuerySpaceRequiredOnDriveA(HDSKSPC DiskSpace, /*********************************************************************** * SetupDestroyDiskSpaceList (SETUPAPI.@) */ @@ -291,5 +290,5 @@ index 1ca45f9..7c33542 100644 } -- -2.7.1 +2.20.1 diff --git a/patches/setupapi-DiskSpaceList/0002-setupapi-Implement-SetupAddToDiskSpaceList.patch b/patches/setupapi-DiskSpaceList/0002-setupapi-Implement-SetupAddToDiskSpaceList.patch index 48d71535..81f7353e 100644 --- a/patches/setupapi-DiskSpaceList/0002-setupapi-Implement-SetupAddToDiskSpaceList.patch +++ b/patches/setupapi-DiskSpaceList/0002-setupapi-Implement-SetupAddToDiskSpaceList.patch @@ -98,7 +98,7 @@ index 7c33542..f945b99 100644 + + LIST_FOR_EACH_ENTRY(file, &list->files, struct file_entry, entry) + { -+ if (!strcmpiW(file->path, fullpathW)) ++ if (!lstrcmpiW(file->path, fullpathW)) + break; + } + diff --git a/patches/setupapi-DiskSpaceList/0003-setupapi-Implement-SetupQueryDrivesInDiskSpaceList.patch b/patches/setupapi-DiskSpaceList/0003-setupapi-Implement-SetupQueryDrivesInDiskSpaceList.patch index ef28bcd4..e095d299 100644 --- a/patches/setupapi-DiskSpaceList/0003-setupapi-Implement-SetupQueryDrivesInDiskSpaceList.patch +++ b/patches/setupapi-DiskSpaceList/0003-setupapi-Implement-SetupQueryDrivesInDiskSpaceList.patch @@ -42,10 +42,10 @@ index 0e589fa..378aa59d 100644 + int device; + + /* UNC paths are not yet supported by this function */ -+ if (tolowerW(file->path[0]) < 'a' || tolowerW(file->path[0]) > 'z' || file->path[1] != ':') ++ if (towlower(file->path[0]) < 'a' || towlower(file->path[0]) > 'z' || file->path[1] != ':') + continue; + -+ device = tolowerW(file->path[0]) - 'a'; ++ device = towlower(file->path[0]) - 'a'; + if (used[device]) continue; + + cur_size += 3; @@ -58,7 +58,7 @@ index 0e589fa..378aa59d 100644 + SetLastError(ERROR_INSUFFICIENT_BUFFER); + return FALSE; + } -+ *buffer++ = tolowerW(file->path[0]); ++ *buffer++ = towlower(file->path[0]); + *buffer++ = ':'; + *buffer++ = 0; + } diff --git a/patches/setupapi-DiskSpaceList/0005-setupapi-ImplementSetupAddSectionToDiskSpaceList.patch b/patches/setupapi-DiskSpaceList/0005-setupapi-ImplementSetupAddSectionToDiskSpaceList.patch index e30c9895..482831c4 100644 --- a/patches/setupapi-DiskSpaceList/0005-setupapi-ImplementSetupAddSectionToDiskSpaceList.patch +++ b/patches/setupapi-DiskSpaceList/0005-setupapi-ImplementSetupAddSectionToDiskSpaceList.patch @@ -32,7 +32,7 @@ index af36dd4..73e7fbd 100644 + return FALSE; + + /* FIXME: is there a atollW ? */ -+ *size = atolW(buffer); ++ *size = wcstol(buffer); + return TRUE; +} + @@ -98,7 +98,7 @@ index af36dd4..73e7fbd 100644 + if (!get_size_from_inf(hinf, src[0] ? src : dest, &filesize)) + goto end; + -+ path_size = strlenW(dest_dir) + strlenW(dest) + 2; ++ path_size = lstrlenW(dest_dir) + lstrlenW(dest) + 2; + full_path = HeapAlloc(GetProcessHeap(), 0, path_size * sizeof(WCHAR)); + if (!full_path) + { @@ -106,9 +106,9 @@ index af36dd4..73e7fbd 100644 + goto end; + } + -+ strcpyW(full_path, dest_dir); -+ strcatW(full_path, sepW); -+ strcatW(full_path, dest); ++ lstrcpyW(full_path, dest_dir); ++ lstrcatW(full_path, sepW); ++ lstrcatW(full_path, dest); + + tmp_ret = SetupAddToDiskSpaceListW(diskspace, full_path, filesize, operation, 0, 0); + HeapFree(GetProcessHeap(), 0, full_path); diff --git a/patches/setupapi-Display_Device/0003-setupapi-Also-create-HardwareId-registry-key-for-dis.patch b/patches/setupapi-Display_Device/0003-setupapi-Also-create-HardwareId-registry-key-for-dis.patch index 2dd53251..eabeb8e7 100644 --- a/patches/setupapi-Display_Device/0003-setupapi-Also-create-HardwareId-registry-key-for-dis.patch +++ b/patches/setupapi-Display_Device/0003-setupapi-Also-create-HardwareId-registry-key-for-dis.patch @@ -26,7 +26,7 @@ index 4b67833..67aa98d 100644 RegSetValueExW(intKey, Driver, 0, REG_SZ, (BYTE *)ddriverGUIDW, sizeof(ddriverGUIDW)); + if ((str = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (strlenW(disp->DeviceID) + 2) * sizeof(WCHAR)))) + { -+ strcpyW(str, disp->DeviceID); /* we need two \0 for REG_MULTI_SZ */ ++ lstrcpyW(str, disp->DeviceID); /* we need two \0 for REG_MULTI_SZ */ + RegSetValueExW(intKey, HardwareId, 0, REG_MULTI_SZ, (BYTE *)str, (strlenW(str) + 2) * sizeof(WCHAR)); + HeapFree(GetProcessHeap(), 0, str); + } diff --git a/patches/setupapi-SPFILENOTIFY_FILEINCABINET/0004-setupapi-Fix-parameters-of-SPFILENOTIFY_FILEINCABINE.patch b/patches/setupapi-SPFILENOTIFY_FILEINCABINET/0004-setupapi-Fix-parameters-of-SPFILENOTIFY_FILEINCABINE.patch index 78e68258..a5862f9e 100644 --- a/patches/setupapi-SPFILENOTIFY_FILEINCABINET/0004-setupapi-Fix-parameters-of-SPFILENOTIFY_FILEINCABINE.patch +++ b/patches/setupapi-SPFILENOTIFY_FILEINCABINET/0004-setupapi-Fix-parameters-of-SPFILENOTIFY_FILEINCABINE.patch @@ -1,4 +1,4 @@ -From 256b83d92adbffe2d928e74b95466fefd7cff60b Mon Sep 17 00:00:00 2001 +From 5be18984e1d53bb3ca5871a535a5999ec9a1b3b4 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Thu, 20 Apr 2017 17:08:11 +0800 Subject: [PATCH] setupapi: Fix parameters of SPFILENOTIFY_FILEINCABINET @@ -11,10 +11,10 @@ Bug 42827 references the setup application that depends on this. 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/dlls/setupapi/setupcab.c b/dlls/setupapi/setupcab.c -index 0146e575d41..6a02faa4cb3 100644 +index 0581d5f6828..e6b4a36a4ab 100644 --- a/dlls/setupapi/setupcab.c +++ b/dlls/setupapi/setupcab.c -@@ -323,7 +323,7 @@ static INT_PTR CDECL sc_FNNOTIFY_A(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION p +@@ -322,7 +322,7 @@ static INT_PTR CDECL sc_FNNOTIFY_A(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION p fici.DosAttribs = pfdin->attribs; memset(fici.FullTargetName, 0, MAX_PATH); err = phsc->msghandler(phsc->context, SPFILENOTIFY_FILEINCABINET, @@ -23,7 +23,7 @@ index 0146e575d41..6a02faa4cb3 100644 if (err == FILEOP_DOIT) { TRACE(" Callback specified filename: %s\n", debugstr_a(fici.FullTargetName)); if (!fici.FullTargetName[0]) { -@@ -459,7 +459,7 @@ static INT_PTR CDECL sc_FNNOTIFY_W(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION p +@@ -458,7 +458,7 @@ static INT_PTR CDECL sc_FNNOTIFY_W(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION p fici.DosAttribs = pfdin->attribs; memset(fici.FullTargetName, 0, MAX_PATH * sizeof(WCHAR)); err = phsc->msghandler(phsc->context, SPFILENOTIFY_FILEINCABINET, @@ -32,7 +32,7 @@ index 0146e575d41..6a02faa4cb3 100644 if (err == FILEOP_DOIT) { TRACE(" Callback specified filename: %s\n", debugstr_w(fici.FullTargetName)); if (fici.FullTargetName[0]) { -@@ -587,8 +587,8 @@ BOOL WINAPI SetupIterateCabinetA(PCSTR CabinetFile, DWORD Reserved, +@@ -586,8 +586,8 @@ BOOL WINAPI SetupIterateCabinetA(PCSTR CabinetFile, DWORD Reserved, TRACE("path: %s, cabfile: %s\n", debugstr_a(pszCabPath), debugstr_a(pszCabinet)); @@ -43,18 +43,18 @@ index 0146e575d41..6a02faa4cb3 100644 my_hsc.magic = SC_HSC_A_MAGIC; my_hsc.msghandler = MsgHandler; -@@ -638,19 +638,18 @@ BOOL WINAPI SetupIterateCabinetW(PCWSTR CabinetFile, DWORD Reserved, +@@ -637,19 +637,18 @@ BOOL WINAPI SetupIterateCabinetW(PCWSTR CabinetFile, DWORD Reserved, } if (p) { -- strcpyW(my_hsc.most_recent_cabinet_name, p); +- lstrcpyW(my_hsc.most_recent_cabinet_name, p); + WideCharToMultiByte(CP_ACP, 0, p, -1, pszCabinet, MAX_PATH, 0, 0); *p = 0; len = WideCharToMultiByte(CP_ACP, 0, pszCabPathW, -1, pszCabPath, MAX_PATH, 0, 0); if (!len) return FALSE; } else { -- strcpyW(my_hsc.most_recent_cabinet_name, CabinetFile); +- lstrcpyW(my_hsc.most_recent_cabinet_name, CabinetFile); + WideCharToMultiByte(CP_ACP, 0, CabinetFile, -1, pszCabinet, MAX_PATH, 0, 0); pszCabPath[0] = '\0'; } @@ -63,7 +63,7 @@ index 0146e575d41..6a02faa4cb3 100644 - pszCabinet, MAX_PATH, 0, 0); - if (!len) return FALSE; + /* remember original cabinet name */ -+ strcpyW(my_hsc.most_recent_cabinet_name, CabinetFile); ++ lstrcpyW(my_hsc.most_recent_cabinet_name, CabinetFile); TRACE("path: %s, cabfile: %s\n", debugstr_a(pszCabPath), debugstr_a(pszCabinet)); @@ -104,5 +104,5 @@ index 88516a67b0c..2e776e66879 100644 "[%d] Expected cabinet %s, got %s\n", index, wine_dbgstr_w(ctx->cabinet), wine_dbgstr_w(info->Source)); -- -2.17.1 +2.20.1 diff --git a/patches/setupapi-SetupPromptForDisk/0001-setupapi-Add-support-for-IDF_CHECKFIRST-flag-in-Setu.patch b/patches/setupapi-SetupPromptForDisk/0001-setupapi-Add-support-for-IDF_CHECKFIRST-flag-in-Setu.patch index 696475d2..d6d7f039 100644 --- a/patches/setupapi-SetupPromptForDisk/0001-setupapi-Add-support-for-IDF_CHECKFIRST-flag-in-Setu.patch +++ b/patches/setupapi-SetupPromptForDisk/0001-setupapi-Add-support-for-IDF_CHECKFIRST-flag-in-Setu.patch @@ -21,21 +21,21 @@ index 24a46e8..daacaf5 100644 + static const WCHAR format[] = {'%', 's', '\\', '%', 's', '\0'}; + WCHAR filepath[MAX_PATH]; + -+ if (strlenW(PathToSource) + 1 + strlenW(FileSought) < sizeof(filepath)) ++ if (lstrlenW(PathToSource) + 1 + lstrlenW(FileSought) < sizeof(filepath)) + { -+ snprintfW(filepath, MAX_PATH, format, PathToSource, FileSought); ++ snwprintf(filepath, MAX_PATH, format, PathToSource, FileSought); + + if (GetFileAttributesW(filepath) != INVALID_FILE_ATTRIBUTES) + { + if (PathRequiredSize) -+ *PathRequiredSize = strlenW(PathToSource) + 1; ++ *PathRequiredSize = lstrlenW(PathToSource) + 1; + + if (!PathBuffer) + return DPROMPT_SUCCESS; + -+ if (PathBufferSize >= strlenW(PathToSource) + 1) ++ if (PathBufferSize >= lstrlenW(PathToSource) + 1) + { -+ strcpyW(PathBuffer, PathToSource); ++ lstrcpyW(PathBuffer, PathToSource); + return DPROMPT_SUCCESS; + } + else diff --git a/patches/wineboot-DriveSerial/0001-wineboot-Assign-a-drive-serial-number-during-prefix-.patch b/patches/wineboot-DriveSerial/0001-wineboot-Assign-a-drive-serial-number-during-prefix-.patch index cf778427..224052b4 100644 --- a/patches/wineboot-DriveSerial/0001-wineboot-Assign-a-drive-serial-number-during-prefix-.patch +++ b/patches/wineboot-DriveSerial/0001-wineboot-Assign-a-drive-serial-number-during-prefix-.patch @@ -1,4 +1,4 @@ -From 3a10fc7a8048fcab8e9e08b2d4fb3f7cad6ce0d0 Mon Sep 17 00:00:00 2001 +From d2e7f4fe7e71d2bba84f26e8055b0e0ca8cd1005 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Mon, 25 May 2015 06:07:50 +0200 Subject: [PATCH] wineboot: Assign a drive serial number during prefix @@ -9,10 +9,10 @@ Subject: [PATCH] wineboot: Assign a drive serial number during prefix 1 file changed, 32 insertions(+) diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c -index 32e4225..6ce8b5c 100644 +index 834bf92730f..af45f7ff9a9 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c -@@ -81,6 +81,7 @@ +@@ -69,6 +69,7 @@ #include #include #include @@ -20,8 +20,8 @@ index 32e4225..6ce8b5c 100644 #include "resource.h" WINE_DEFAULT_DEBUG_CHANNEL(wineboot); -@@ -265,6 +266,36 @@ static void get_namestring( WCHAR *buf ) - for (i = strlenW(buf) - 1; i >= 0 && buf[i] == ' '; i--) buf[i] = 0; +@@ -287,6 +288,36 @@ static void get_namestring( WCHAR *buf ) + for (i = lstrlenW(buf) - 1; i >= 0 && buf[i] == ' '; i--) buf[i] = 0; } +/* set a serial number for the disk containing windows */ @@ -36,7 +36,7 @@ index 32e4225..6ce8b5c 100644 + if (GetSystemDirectoryW( path, sizeof(path)/sizeof(path[0]) ) && path[1] == ':') + { + path[2] = 0; -+ strcatW( path, filename ); ++ lstrcatW( path, filename ); + if (!PathFileExistsW( path ) && RtlGenRandom( &serial, sizeof(serial) )) + { + WINE_TRACE( "Putting serial number of %08X into file %s\n", serial, wine_dbgstr_w(path) ); @@ -57,7 +57,7 @@ index 32e4225..6ce8b5c 100644 /* create the volatile hardware registry keys */ static void create_hardware_registry_keys(void) { -@@ -1342,6 +1373,7 @@ int main( int argc, char *argv[] ) +@@ -1360,6 +1391,7 @@ int __cdecl main( int argc, char *argv[] ) ResetEvent( event ); /* in case this is a restart */ @@ -66,5 +66,5 @@ index 32e4225..6ce8b5c 100644 create_dynamic_registry_keys(); create_environment_registry_keys(); -- -1.9.1 +2.20.1 diff --git a/patches/wineboot-ProxySettings/0001-wineboot-Initialize-proxy-settings-registry-key.patch b/patches/wineboot-ProxySettings/0001-wineboot-Initialize-proxy-settings-registry-key.patch index 63777737..d714268e 100644 --- a/patches/wineboot-ProxySettings/0001-wineboot-Initialize-proxy-settings-registry-key.patch +++ b/patches/wineboot-ProxySettings/0001-wineboot-Initialize-proxy-settings-registry-key.patch @@ -1,7 +1,7 @@ -From 86c5e611e38486f957c9f59c62559be15ae1a4ab Mon Sep 17 00:00:00 2001 +From d22de677b47898569530c3989ed560e26075c027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Mon, 26 Dec 2016 16:37:40 +0100 -Subject: wineboot: Initialize proxy settings registry key. +Subject: [PATCH] wineboot: Initialize proxy settings registry key. --- programs/wineboot/Makefile.in | 2 +- @@ -9,7 +9,7 @@ Subject: wineboot: Initialize proxy settings registry key. 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/programs/wineboot/Makefile.in b/programs/wineboot/Makefile.in -index 419ec16..1cacab1 100644 +index eaea154057f..517010b6823 100644 --- a/programs/wineboot/Makefile.in +++ b/programs/wineboot/Makefile.in @@ -1,7 +1,7 @@ @@ -19,13 +19,13 @@ index 419ec16..1cacab1 100644 -DELAYIMPORTS = shell32 shlwapi version user32 +DELAYIMPORTS = shell32 shlwapi version user32 wininet - C_SRCS = \ - shutdown.c \ + EXTRADLLFLAGS = -mno-cygwin + diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c -index 8994cab..814fe90 100644 +index fb67051e7d0..9302f8703a9 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c -@@ -82,6 +82,7 @@ +@@ -70,6 +70,7 @@ #include #include #include @@ -33,7 +33,7 @@ index 8994cab..814fe90 100644 #include "resource.h" WINE_DEFAULT_DEBUG_CHANNEL(wineboot); -@@ -554,6 +555,13 @@ static void create_volatile_environment_registry_key(void) +@@ -690,6 +691,13 @@ static void create_volatile_environment_registry_key(void) RegCloseKey( hkey ); } @@ -47,7 +47,7 @@ index 8994cab..814fe90 100644 static void create_etc_stub_files(void) { static const WCHAR drivers_etcW[] = {'\\','d','r','i','v','e','r','s','\\','e','t','c',0}; -@@ -1418,6 +1426,7 @@ int main( int argc, char *argv[] ) +@@ -1548,6 +1556,7 @@ int __cdecl main( int argc, char *argv[] ) if (init || update) update_wineprefix( update ); create_volatile_environment_registry_key(); @@ -56,5 +56,5 @@ index 8994cab..814fe90 100644 ProcessRunKeys( HKEY_LOCAL_MACHINE, RunOnceW, TRUE, TRUE ); -- -2.9.0 +2.20.1 diff --git a/patches/wineboot-drivers_etc_Stubs/0001-wineboot-Init-system32-drivers-etc-host-networks-pro.patch b/patches/wineboot-drivers_etc_Stubs/0001-wineboot-Init-system32-drivers-etc-host-networks-pro.patch index baacb52d..e3340134 100644 --- a/patches/wineboot-drivers_etc_Stubs/0001-wineboot-Init-system32-drivers-etc-host-networks-pro.patch +++ b/patches/wineboot-drivers_etc_Stubs/0001-wineboot-Init-system32-drivers-etc-host-networks-pro.patch @@ -1,19 +1,19 @@ -From 6127b7897fb868a9a80cd53d2123402570662d68 Mon Sep 17 00:00:00 2001 +From 8502098a799563ce96eaa0ecc891f0ec3b905511 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 13 May 2015 06:58:16 +0200 -Subject: wineboot: Init +Subject: [PATCH] wineboot: Init system32/drivers/etc/{host,networks,protocol,services}. Based on a patch by Jactry Zeng. --- - programs/wineboot/wineboot.c | 38 ++++++++++++++++++++++++++++++++++++++ + programs/wineboot/wineboot.c | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c -index a20b4e1..b2cc0a9 100644 +index 0fc762096df..fb67051e7d0 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c -@@ -417,6 +417,41 @@ static void create_volatile_environment_registry_key(void) +@@ -690,6 +690,41 @@ static void create_volatile_environment_registry_key(void) RegCloseKey( hkey ); } @@ -30,8 +30,8 @@ index a20b4e1..b2cc0a9 100644 + HANDLE file; + + GetSystemDirectoryW( path, MAX_PATH ); -+ strcatW( path, drivers_etcW ); -+ path_len = strlenW( path ); ++ lstrcatW( path, drivers_etcW ); ++ path_len = lstrlenW( path ); + + if (!CreateDirectoryW( path, NULL ) && GetLastError() != ERROR_ALREADY_EXISTS) + return; @@ -40,7 +40,7 @@ index a20b4e1..b2cc0a9 100644 + for (i = 0; i < sizeof(files) / sizeof(files[0]); i++) + { + path[ path_len ] = 0; -+ strcatW( path, files[i] ); ++ lstrcatW( path, files[i] ); + if (PathFileExistsW( path )) continue; + + file = CreateFileW( path, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, @@ -55,16 +55,16 @@ index a20b4e1..b2cc0a9 100644 /* Performs the rename operations dictated in %SystemRoot%\Wininit.ini. * Returns FALSE if there was an error, or otherwise if all is ok. */ -@@ -1023,6 +1058,9 @@ static void update_wineprefix( BOOL force ) +@@ -1287,6 +1322,9 @@ static void update_wineprefix( BOOL force ) } DestroyWindow( hwnd ); } + + create_etc_stub_files(); + - WINE_MESSAGE( "wine: configuration in '%s' has been updated.\n", config_dir ); + WINE_MESSAGE( "wine: configuration in '%s' has been updated.\n", prettyprint_configdir() ); } -- -2.4.0 +2.20.1 diff --git a/patches/wined3d-mesa_texture_download/0001-wined3d-Use-glReadPixels-for-RT-texture-download.patch b/patches/wined3d-mesa_texture_download/0001-wined3d-Use-glReadPixels-for-RT-texture-download.patch index 8b00985d..bd242187 100644 --- a/patches/wined3d-mesa_texture_download/0001-wined3d-Use-glReadPixels-for-RT-texture-download.patch +++ b/patches/wined3d-mesa_texture_download/0001-wined3d-Use-glReadPixels-for-RT-texture-download.patch @@ -1,57 +1,57 @@ -From 96a14002a93d7c058944649b0720159f98a75f71 Mon Sep 17 00:00:00 2001 +From 416d92bcc80c6881340a2e9879c284c5edcd2c93 Mon Sep 17 00:00:00 2001 From: Andrew Wesie Date: Sun, 30 Sep 2018 12:02:00 -0500 Subject: [PATCH] wined3d: Use glReadPixels for RT texture download. Signed-off-by: Andrew Wesie --- - dlls/wined3d/texture.c | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) + dlls/wined3d/texture.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c -index b865c9c..b2e5ea3 100644 +index 6ae822ddf2..9090822a4c 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c -@@ -2366,12 +2366,15 @@ void wined3d_texture_download_data(struct wined3d_texture *texture, unsigned int - struct wined3d_context *context, const struct wined3d_bo_address *data) - { - const struct wined3d_gl_info *gl_info = context->gl_info; -+ struct wined3d_context_gl *context_gl = wined3d_context_gl(context); +@@ -2386,6 +2386,7 @@ static void wined3d_texture_gl_download_data(struct wined3d_context *context, const struct wined3d_format_gl *format_gl; -+ struct wined3d_texture_sub_resource *sub_resource; - unsigned int level; + BOOL srgb = FALSE; GLenum target; ++ struct wined3d_texture_sub_resource *sub_resource; - format_gl = wined3d_format_gl(texture->resource.format); - target = wined3d_texture_gl_get_sub_resource_target(wined3d_texture_gl(texture), sub_resource_idx); -+ sub_resource = &texture->sub_resources[sub_resource_idx]; - level = sub_resource_idx % texture->level_count; + TRACE("context %p, src_texture %p, src_sub_resource_idx %u, src_location %s, src_box %s, dst_bo_addr %s, " + "dst_format %s, dst_x %u, dst_y %u, dst_z %u, dst_row_pitch %u, dst_slice_pitch %u.\n", +@@ -2440,6 +2441,7 @@ static void wined3d_texture_gl_download_data(struct wined3d_context *context, - if ((texture->resource.type == WINED3D_RTYPE_TEXTURE_2D -@@ -2405,6 +2408,23 @@ void wined3d_texture_download_data(struct wined3d_texture *texture, unsigned int - GL_EXTCALL(glGetCompressedTexImage(target, level, data->addr)); + format_gl = wined3d_format_gl(src_texture->resource.format); + target = wined3d_texture_gl_get_sub_resource_target(src_texture_gl, src_sub_resource_idx); ++ sub_resource = &src_texture->sub_resources[src_sub_resource_idx]; + + if ((src_texture->resource.type == WINED3D_RTYPE_TEXTURE_2D + && (target == GL_TEXTURE_2D_ARRAY || format_gl->f.conv_byte_count +@@ -2472,6 +2474,23 @@ static void wined3d_texture_gl_download_data(struct wined3d_context *context, + GL_EXTCALL(glGetCompressedTexImage(target, src_level, dst_bo_addr->addr)); checkGLcall("glGetCompressedTexImage"); } -+ else if (data->buffer_object && texture->resource.bind_flags & WINED3D_BIND_RENDER_TARGET) ++ else if (dst_bo_addr->buffer_object && src_texture->resource.bind_flags & WINED3D_BIND_RENDER_TARGET) + { + /* PBO texture download is not accelerated on Mesa. Use glReadPixels if possible. */ + TRACE("Downloading (glReadPixels) texture %p, %u, level %u, format %#x, type %#x, data %p.\n", -+ texture, sub_resource_idx, level, format_gl->format, format_gl->type, data->addr); ++ src_texture, src_sub_resource_idx, src_level, format_gl->format, format_gl->type, dst_bo_addr->addr); + -+ wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_READ_FRAMEBUFFER, &texture->resource, sub_resource_idx, NULL, ++ wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_READ_FRAMEBUFFER, &src_texture->resource, src_sub_resource_idx, NULL, + 0, sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)); + wined3d_context_gl_check_fbo_status(context_gl, GL_READ_FRAMEBUFFER); + context_invalidate_state(context, STATE_FRAMEBUFFER); + gl_info->gl_ops.gl.p_glReadBuffer(GL_COLOR_ATTACHMENT0); + checkGLcall("glReadBuffer()"); + -+ gl_info->gl_ops.gl.p_glReadPixels(0, 0, wined3d_texture_get_level_width(texture, level), -+ wined3d_texture_get_level_height(texture, level), format_gl->format, format_gl->type, data->addr); ++ gl_info->gl_ops.gl.p_glReadPixels(0, 0, wined3d_texture_get_level_width(src_texture, src_level), ++ wined3d_texture_get_level_height(src_texture, src_level), format_gl->format, format_gl->type, dst_bo_addr->addr); + checkGLcall("glReadPixels"); + } else { TRACE("Downloading texture %p, %u, level %u, format %#x, type %#x, data %p.\n", -- -1.9.1 +2.20.1 diff --git a/patches/winmm-Delay_Import_Depends/0001-winmm-Delay-import-ole32-msacm32-to-workaround-bug-w.patch b/patches/winmm-Delay_Import_Depends/0001-winmm-Delay-import-ole32-msacm32-to-workaround-bug-w.patch index 10e05452..5486e88a 100644 --- a/patches/winmm-Delay_Import_Depends/0001-winmm-Delay-import-ole32-msacm32-to-workaround-bug-w.patch +++ b/patches/winmm-Delay_Import_Depends/0001-winmm-Delay-import-ole32-msacm32-to-workaround-bug-w.patch @@ -1,15 +1,15 @@ -From fecee7ab784c5befc19fa83ac9430960d1572811 Mon Sep 17 00:00:00 2001 +From ce22b00ff42b914d27e8741d51b1fe8d6e98c2e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sat, 31 Jan 2015 06:00:38 +0100 -Subject: winmm: Delay import ole32 msacm32 to workaround bug when loading - multiple winmm versions. +Subject: [PATCH] winmm: Delay import ole32 msacm32 to workaround bug when + loading multiple winmm versions. --- dlls/winmm/Makefile.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/winmm/Makefile.in b/dlls/winmm/Makefile.in -index 3036526..0cf4b3c 100644 +index c05115d5c58..2b3bcf92d9a 100644 --- a/dlls/winmm/Makefile.in +++ b/dlls/winmm/Makefile.in @@ -1,7 +1,8 @@ @@ -20,8 +20,8 @@ index 3036526..0cf4b3c 100644 +IMPORTS = uuid user32 advapi32 +DELAYIMPORTS = ole32 msacm32 - C_SRCS = \ - driver.c \ + EXTRADLLFLAGS = -mno-cygwin + -- -2.2.2 +2.20.1