server: Get rid of the exe_file parameter in the new_process request.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2021-01-26 16:38:38 +01:00
parent ced3892c65
commit 5ff2b7d98f
7 changed files with 6 additions and 23 deletions

View File

@ -946,7 +946,6 @@ NTSTATUS WINAPI NtCreateUserProcess( HANDLE *process_handle_ptr, HANDLE *thread_
req->inherit_all = !!(process_flags & PROCESS_CREATE_FLAGS_INHERIT_HANDLES);
req->create_flags = params->DebugFlags; /* hack: creation flags stored in DebugFlags for now */
req->socket_fd = socketfd[1];
req->exe_file = wine_server_obj_handle( file_handle );
req->access = process_access;
req->cpu = pe_info.cpu;
req->info_size = startup_info_size;

View File

@ -794,7 +794,6 @@ struct new_process_request
int inherit_all;
unsigned int create_flags;
int socket_fd;
obj_handle_t exe_file;
unsigned int access;
client_cpu_t cpu;
data_size_t info_size;
@ -803,7 +802,6 @@ struct new_process_request
/* VARARG(handles,uints,handles_size); */
/* VARARG(info,startup_info,info_size); */
/* VARARG(env,unicode_str); */
char __pad_52[4];
};
struct new_process_reply
{
@ -6191,7 +6189,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 654
#define SERVER_PROTOCOL_VERSION 655
/* ### protocol_version end ### */

View File

@ -532,7 +532,6 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
process->startup_state = STARTUP_IN_PROGRESS;
process->startup_info = NULL;
process->idle_event = NULL;
process->exe_file = NULL;
process->peb = 0;
process->ldt_copy = 0;
process->dir_cache = NULL;
@ -642,7 +641,6 @@ static void process_destroy( struct object *obj )
if (process->msg_fd) release_object( process->msg_fd );
list_remove( &process->entry );
if (process->idle_event) release_object( process->idle_event );
if (process->exe_file) release_object( process->exe_file );
if (process->id) free_ptid( process->id );
if (process->token) release_object( process->token );
free( process->dir_cache );
@ -912,9 +910,7 @@ static void process_killed( struct process *process )
close_process_handles( process );
cancel_process_asyncs( process );
if (process->idle_event) release_object( process->idle_event );
if (process->exe_file) release_object( process->exe_file );
process->idle_event = NULL;
process->exe_file = NULL;
assert( !process->console );
while ((ptr = list_head( &process->rawinput_devices )))
@ -1237,10 +1233,6 @@ DECL_HANDLER(new_process)
process->startup_info = (struct startup_info *)grab_object( info );
if (req->exe_file &&
!(process->exe_file = get_file_obj( current->process, req->exe_file, FILE_READ_DATA )))
goto done;
if (parent->job
&& !(req->create_flags & CREATE_BREAKAWAY_FROM_JOB)
&& !(parent->job->limit_flags & JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK))
@ -1384,8 +1376,6 @@ DECL_HANDLER(init_process_done)
process->ldt_copy = req->ldt_copy;
process->start_time = current_time;
current->entry_point = req->entry;
if (process->exe_file) release_object( process->exe_file );
process->exe_file = NULL;
init_process_tracing( process );
generate_startup_debug_events( process, req->entry );

View File

@ -84,7 +84,6 @@ struct process
enum startup_state startup_state; /* startup state */
struct startup_info *startup_info; /* startup info while init is in progress */
struct event *idle_event; /* event for input idle */
struct file *exe_file; /* file handle for main exe (during startup only) */
obj_handle_t winstation; /* main handle to process window station */
obj_handle_t desktop; /* handle to desktop to use for new threads */
struct token *token; /* security token associated with this process */

View File

@ -808,7 +808,6 @@ typedef struct
int inherit_all; /* inherit all handles from parent */
unsigned int create_flags; /* creation flags */
int socket_fd; /* file descriptor for process socket */
obj_handle_t exe_file; /* file handle for main exe */
unsigned int access; /* access rights for process object */
client_cpu_t cpu; /* CPU that the new process will use */
data_size_t info_size; /* size of startup info */

View File

@ -710,12 +710,11 @@ C_ASSERT( FIELD_OFFSET(struct new_process_request, parent_process) == 16 );
C_ASSERT( FIELD_OFFSET(struct new_process_request, inherit_all) == 20 );
C_ASSERT( FIELD_OFFSET(struct new_process_request, create_flags) == 24 );
C_ASSERT( FIELD_OFFSET(struct new_process_request, socket_fd) == 28 );
C_ASSERT( FIELD_OFFSET(struct new_process_request, exe_file) == 32 );
C_ASSERT( FIELD_OFFSET(struct new_process_request, access) == 36 );
C_ASSERT( FIELD_OFFSET(struct new_process_request, cpu) == 40 );
C_ASSERT( FIELD_OFFSET(struct new_process_request, info_size) == 44 );
C_ASSERT( FIELD_OFFSET(struct new_process_request, handles_size) == 48 );
C_ASSERT( sizeof(struct new_process_request) == 56 );
C_ASSERT( FIELD_OFFSET(struct new_process_request, access) == 32 );
C_ASSERT( FIELD_OFFSET(struct new_process_request, cpu) == 36 );
C_ASSERT( FIELD_OFFSET(struct new_process_request, info_size) == 40 );
C_ASSERT( FIELD_OFFSET(struct new_process_request, handles_size) == 44 );
C_ASSERT( sizeof(struct new_process_request) == 48 );
C_ASSERT( FIELD_OFFSET(struct new_process_reply, info) == 8 );
C_ASSERT( FIELD_OFFSET(struct new_process_reply, pid) == 12 );
C_ASSERT( FIELD_OFFSET(struct new_process_reply, handle) == 16 );

View File

@ -1314,7 +1314,6 @@ static void dump_new_process_request( const struct new_process_request *req )
fprintf( stderr, ", inherit_all=%d", req->inherit_all );
fprintf( stderr, ", create_flags=%08x", req->create_flags );
fprintf( stderr, ", socket_fd=%d", req->socket_fd );
fprintf( stderr, ", exe_file=%04x", req->exe_file );
fprintf( stderr, ", access=%08x", req->access );
dump_client_cpu( ", cpu=", &req->cpu );
fprintf( stderr, ", info_size=%u", req->info_size );