Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2cab0ec3
Commit
2cab0ec3
authored
Sep 24, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Don't return the process exe file to the client.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d6683d63
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
21 deletions
+9
-21
loader.c
dlls/ntdll/loader.c
+1
-3
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+1
-1
thread.c
dlls/ntdll/thread.c
+3
-7
server_protocol.h
include/wine/server_protocol.h
+2
-2
process.c
server/process.c
+0
-3
protocol.def
server/protocol.def
+0
-1
request.h
server/request.h
+1
-2
trace.c
server/trace.c
+1
-2
No files found.
dlls/ntdll/loader.c
View file @
2cab0ec3
...
...
@@ -117,7 +117,6 @@ struct builtin_load_info
static
struct
builtin_load_info
default_load_info
;
static
struct
builtin_load_info
*
builtin_load_info
=
&
default_load_info
;
static
HANDLE
main_exe_file
;
static
UINT
tls_module_count
;
/* number of modules with TLS directory */
static
IMAGE_TLS_DIRECTORY
*
tls_dirs
;
/* array of TLS directories */
LIST_ENTRY
tls_links
=
{
&
tls_links
,
&
tls_links
};
...
...
@@ -3331,7 +3330,6 @@ void WINAPI LdrInitializeThunk( void *kernel_start, ULONG_PTR unknown2,
PEB
*
peb
=
NtCurrentTeb
()
->
Peb
;
kernel32_start_process
=
kernel_start
;
if
(
main_exe_file
)
NtClose
(
main_exe_file
);
/* at this point the main module is created */
/* allocate the modref for the main exe (if not already done) */
wm
=
get_modref
(
peb
->
ImageBaseAddress
);
...
...
@@ -3506,7 +3504,7 @@ void __wine_process_init(void)
ANSI_STRING
func_name
;
void
(
*
DECLSPEC_NORETURN
CDECL
init_func
)(
void
);
main_exe_file
=
thread_init
();
thread_init
();
/* retrieve current umask */
FILE_umask
=
umask
(
0777
);
...
...
dlls/ntdll/ntdll_misc.h
View file @
2cab0ec3
...
...
@@ -73,7 +73,7 @@ extern void DECLSPEC_NORETURN signal_exit_thread( int status ) DECLSPEC_HIDDEN;
extern
void
DECLSPEC_NORETURN
signal_exit_process
(
int
status
)
DECLSPEC_HIDDEN
;
extern
void
version_init
(
const
WCHAR
*
appname
)
DECLSPEC_HIDDEN
;
extern
void
debug_init
(
void
)
DECLSPEC_HIDDEN
;
extern
HANDLE
thread_init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
thread_init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
actctx_init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
virtual_init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
virtual_init_threading
(
void
)
DECLSPEC_HIDDEN
;
...
...
dlls/ntdll/thread.c
View file @
2cab0ec3
...
...
@@ -105,7 +105,7 @@ static inline void get_unicode_string( UNICODE_STRING *str, WCHAR **src, WCHAR *
*
* Fill the RTL_USER_PROCESS_PARAMETERS structure from the server.
*/
static
NTSTATUS
init_user_process_params
(
SIZE_T
data_size
,
HANDLE
*
exe_file
)
static
NTSTATUS
init_user_process_params
(
SIZE_T
data_size
)
{
void
*
ptr
;
WCHAR
*
src
,
*
dst
;
...
...
@@ -125,7 +125,6 @@ static NTSTATUS init_user_process_params( SIZE_T data_size, HANDLE *exe_file )
data_size
=
wine_server_reply_size
(
reply
);
info_size
=
reply
->
info_size
;
env_size
=
data_size
-
info_size
;
*
exe_file
=
wine_server_ptr_handle
(
reply
->
exe_file
);
}
}
SERVER_END_REQ
;
...
...
@@ -273,13 +272,12 @@ static ULONG_PTR get_image_addr(void)
*
* NOTES: The first allocated TEB on NT is at 0x7ffde000.
*/
HANDLE
thread_init
(
void
)
void
thread_init
(
void
)
{
TEB
*
teb
;
void
*
addr
;
BOOL
suspend
;
SIZE_T
size
,
info_size
;
HANDLE
exe_file
=
0
;
LARGE_INTEGER
now
;
NTSTATUS
status
;
struct
ntdll_thread_data
*
thread_data
;
...
...
@@ -378,7 +376,7 @@ HANDLE thread_init(void)
/* allocate user parameters */
if
(
info_size
)
{
init_user_process_params
(
info_size
,
&
exe_file
);
init_user_process_params
(
info_size
);
}
else
{
...
...
@@ -404,8 +402,6 @@ HANDLE thread_init(void)
fill_cpu_info
();
NtCreateKeyedEvent
(
&
keyed_event
,
GENERIC_READ
|
GENERIC_WRITE
,
NULL
,
0
);
return
exe_file
;
}
...
...
include/wine/server_protocol.h
View file @
2cab0ec3
...
...
@@ -785,10 +785,10 @@ struct get_startup_info_request
struct
get_startup_info_reply
{
struct
reply_header
__header
;
obj_handle_t
exe_file
;
data_size_t
info_size
;
/* VARARG(info,startup_info,info_size); */
/* VARARG(env,unicode_str); */
char
__pad_12
[
4
];
};
...
...
@@ -6531,6 +6531,6 @@ union generic_reply
struct
terminate_job_reply
terminate_job_reply
;
};
#define SERVER_PROTOCOL_VERSION 56
4
#define SERVER_PROTOCOL_VERSION 56
5
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/process.c
View file @
2cab0ec3
...
...
@@ -1261,9 +1261,6 @@ DECL_HANDLER(get_startup_info)
if
(
!
info
)
return
;
if
(
process
->
exe_file
&&
!
(
reply
->
exe_file
=
alloc_handle
(
process
,
process
->
exe_file
,
GENERIC_READ
,
0
)))
return
;
/* we return the data directly without making a copy so this can only be called once */
reply
->
info_size
=
info
->
info_size
;
size
=
info
->
data_size
;
...
...
server/protocol.def
View file @
2cab0ec3
...
...
@@ -778,7 +778,6 @@ struct rawinput_device
/* Retrieve the new process startup info */
@REQ(get_startup_info)
@REPLY
obj_handle_t exe_file; /* file handle for main exe */
data_size_t info_size; /* size of startup info */
VARARG(info,startup_info,info_size); /* startup information */
VARARG(env,unicode_str); /* environment */
...
...
server/request.h
View file @
2cab0ec3
...
...
@@ -756,8 +756,7 @@ C_ASSERT( FIELD_OFFSET(struct new_thread_reply, tid) == 8 );
C_ASSERT
(
FIELD_OFFSET
(
struct
new_thread_reply
,
handle
)
==
12
);
C_ASSERT
(
sizeof
(
struct
new_thread_reply
)
==
16
);
C_ASSERT
(
sizeof
(
struct
get_startup_info_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_startup_info_reply
,
exe_file
)
==
8
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_startup_info_reply
,
info_size
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_startup_info_reply
,
info_size
)
==
8
);
C_ASSERT
(
sizeof
(
struct
get_startup_info_reply
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
init_process_done_request
,
gui
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
init_process_done_request
,
module
)
==
16
);
...
...
server/trace.c
View file @
2cab0ec3
...
...
@@ -1276,8 +1276,7 @@ static void dump_get_startup_info_request( const struct get_startup_info_request
static
void
dump_get_startup_info_reply
(
const
struct
get_startup_info_reply
*
req
)
{
fprintf
(
stderr
,
" exe_file=%04x"
,
req
->
exe_file
);
fprintf
(
stderr
,
", info_size=%u"
,
req
->
info_size
);
fprintf
(
stderr
,
" info_size=%u"
,
req
->
info_size
);
dump_varargs_startup_info
(
", info="
,
min
(
cur_size
,
req
->
info_size
)
);
dump_varargs_unicode_str
(
", env="
,
cur_size
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment