1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-09 04:16:08 +00:00
Commit Graph

400 Commits

Author SHA1 Message Date
Alexandre Julliard
828077e3b3 server: Pass the NT process flags to the new_process request.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-16 12:07:51 +02:00
Paul Gofman
672df33f7d server: Add sigkill timer even if msg_fd is closed.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 22:16:25 +02:00
Paul Gofman
df066eabdc server: Do not cancel process sigkill in kill_process().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 22:16:25 +02:00
Alexandre Julliard
34884bf5d0 ntdll: Remove the no longer needed exec_process() function.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:49 +01:00
Zebediah Figura
e69d5b9f46 server: Cancel asyncs before closing handles when a process is destroyed.
test_exit_process_async() essentially validates this. The only reason it
currently succeeds (instead of incorrectly returning ERROR_BROKEN_PIPE) is that
due to the use of DuplicateHandle() the source handle is never actually closed.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 12:29:10 +01:00
Alexandre Julliard
4ece7d409a server: Don't return image information for a terminated process.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-11 21:52:17 +01:00
Alexandre Julliard
3c9b5379d1 server: Store a copy of the image file name in the process.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-11 21:52:17 +01:00
Alexandre Julliard
d316d548c2 server: Only keep the running processes in the global process list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-11 18:10:42 +01:00
Zebediah Figura
ec9244f056 ntdll: Implement NtQueryInformationToken(TokenLinkedToken).
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 21:41:59 +01:00
Alexandre Julliard
e7fa4fd147 server: Remove the load/unload_dll requests and the dll list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 16:31:30 +01:00
Alexandre Julliard
ea33192660 server: Report load dll events upon mapping a SEC_IMAGE view.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 16:31:30 +01:00
Alexandre Julliard
146ed693d6 server: Return the NT name for the list_processes request.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 18:15:03 +01:00
Alexandre Julliard
3bb5381587 server: Return the NT name for the ProcessImageFileName query.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 18:15:03 +01:00
Alexandre Julliard
a3c92a02cc server: Get the process entry point from the exe image info.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-08 12:10:49 +01:00
Alexandre Julliard
52d733b5c4 server: Implement retrieving the debug object of a process.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-08 12:09:44 +01:00
Alexandre Julliard
d6ef9401b3 server: Use the object type information to implement access mapping.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 22:53:46 +01:00
Alexandre Julliard
4d646de90d server: Add generic mapping masks for all object types.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:22 +01:00
Alexandre Julliard
c6f2aacb57 server: Add a type descriptor to all server objects.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 21:25:32 +01:00
Alexandre Julliard
d514c64a8c server: Move the ldt_copy pointer to the init_first_thread request.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 10:26:20 +01:00
Alexandre Julliard
44699c324f server: Add a separate request to initialize the first thread of a process.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 10:22:56 +01:00
Alexandre Julliard
123023eac7 server: Fetch the data for the debug events from the process memory views.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 10:12:56 +01:00
Alexandre Julliard
2b6426da65 server: Don't store the debug object in the debugger thread.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 16:48:09 +01:00
Alexandre Julliard
7999af8244 ntdll: Implement NtWaitForDebugEvent().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 16:48:09 +01:00
Alexandre Julliard
11e6f1007c ntdll: Pass a debug object in the new_process request.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 11:08:44 +01:00
Alexandre Julliard
faa9f5be59 server: Store a debug object instead of a debugger thread in the process.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-28 16:52:25 +01:00
Alexandre Julliard
5ff2b7d98f server: Get rid of the exe_file parameter in the new_process request.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-26 16:38:56 +01:00
Jacek Caban
23e7b859a1 server: Remove no longer needed free_console.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 22:18:20 +01:00
Rémi Bernon
e0a1bdf2bc server: Return STATUS_INVALID_CID from NtOpenProcess.
When appropriate, instead of STATUS_INVALID_PARAMETER.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 21:31:53 +01:00
Jacek Caban
c1bfa103a2 server: Remove no longer needed hack for inheriting console from stdin.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-23 21:05:04 +01:00
Nikolay Sivov
fde5967f72 server: Inherit standard handles together with explicit handle list.
Restores standard handles behavior pre-c58a10c16395c30e7793cde1f748febe0432a6ad,
always inheriting them when inherit mode is enabled.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49895
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-29 21:04:13 +02:00
Michael Müller
d0bea3d702 server: Implement support for creating a process with a specified token.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 15:21:43 +02:00
Michael Müller
8c5638aa5e ntdll: Implement NtFilterToken.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-23 15:58:10 +02:00
Alexandre Julliard
82c84548eb server: Use OBJ_PERMANENT for permanent objects.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-23 15:16:13 +02:00
Alexandre Julliard
2e51f9aae3 server: Add an object operation to retrieve an object name.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 16:55:08 +02:00
Nikolay Sivov
c58a10c163 server: Implement inherited handles list.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 14:04:45 +02:00
Zebediah Figura
74dc9aa335 server: Avoid a potential NULL dereference in startup_info_dump().
info->data may be set to NULL by get_startup_info, without invalidating the
object itself.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 12:58:45 +02:00
Jacek Caban
30596feb03 server: Use passed console handle to inherit console for created process.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 21:39:36 +02:00
Jacek Caban
09ff2436c4 server: Pass console handle to the child process.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:12:50 +02:00
Zebediah Figura
82cd85b079 ntdll: Set the thread creation time in NtQuerySystemInformation(SystemProcessInformation).
Process Hacker displays this information.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-08 07:57:41 +02:00
Zebediah Figura
8297392734 ntdll: Set the process creation time in NtQuerySystemInformation(SystemProcessInformation).
Process Hacker displays this information.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-08 07:57:34 +02:00
Zebediah Figura
1ff8fe20bf server: Remove no longer used snapshot requests.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 19:24:27 +02:00
Zebediah Figura
8622eb326f ntdll: Reimplement NtQuerySystemInformation(SystemProcessInformation) using a single server call.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 19:24:27 +02:00
Derek Lesho
d8d6a6b2e6 server: Partially implement JobObjectBasicAccountingInformation.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +02:00
Alexandre Julliard
e854ea34cc ntdll: Create user shared data section in the server, and initialize it in wineboot.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 16:17:32 +02:00
Alexandre Julliard
54a7e592e4 ntdll: Implement ProcessImageInformation class in NtQueryInformationProcess().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-26 15:58:13 +02:00
Rémi Bernon
a1c46c3806 server: Add USD support with timestamp updates.
The USD page is created when the first process (wineboot.exe) completes
its creation, using its provided user_shared_data for initialization.

The server maps the page write-only and the clients map it read-only,
then the server updates the timestamps every 16 ms.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=29168
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-12 10:57:56 +02:00
Rémi Bernon
daa120309e server: Make sure pids/tids are multiples of four.
Street Fighter V unpacker relies on it when validating other processes
for its anti-debug checks, it uses (PID&0xfffffffc)>>2 as an array index
and then checks back indexes against PIDs, and terminates early if some
PIDs do not match.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:01:44 +02:00
Paul Gofman
74a74556dd server: Support creating processes with specified parent.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47817
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 13:13:36 +01:00
Jacek Caban
c1a32a080f server: Report only one debug event per process at the time.
Instead of one per thread.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 00:12:26 +02:00
Jacek Caban
b0ae02bea6 server: Remove no longer needed break_process.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-05 17:43:49 +02:00
Erich E. Hoover
5a79077250 server: Add default security descriptor DACL for processes.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=15980
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 21:57:48 +02:00
Erich E. Hoover
e11e8705eb server: Add default security descriptor ownership for processes.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 21:57:48 +02:00
Derek Lesho
f534fbd3e3 server: Allow creating process kernel objects.
Signed-off-by: Derek Lesho <dereklesho52@Gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-20 00:18:14 +02:00
Nikolay Sivov
19bf03ed4b ntdll: Add NtSuspendProcess()/NtResumeProcess() implementation.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 12:13:36 +02:00
Jacek Caban
b2a546c92d server: Introduce kernel_object struct for generic association between server and kernel objects.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:55:15 +01:00
Jacek Caban
2bb4d24589 server: Support process object type.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 14:27:16 +01:00
Piotr Caban
9fa65a8751 server: Fix process trace_data initialization race on Mac.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-08 10:20:02 -06:00
Alexandre Julliard
bff3255703 server: Pass a process as parent to create_process().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 11:44:38 +02:00
Alexandre Julliard
a77ef5c443 server: Add a separate request to exec a new process.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 11:44:25 +02:00
Alexandre Julliard
2cab0ec389 server: Don't return the process exe file to the client.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-24 22:41:30 +02:00
Alexandre Julliard
d6683d637a server: Store the process exe file in the process structure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-24 22:41:30 +02:00
Alexandre Julliard
ac7ae92af1 server: Allow specifying the security descriptor for a new process.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-20 14:50:48 +02:00
Alexandre Julliard
39afcaac4a server: Create the initial thread as a separate request.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-20 14:50:48 +02:00
Alexandre Julliard
af8f3ae333 server: Move initial thread creation out of the create_process() function.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-20 14:50:48 +02:00
Alexandre Julliard
4a328e08ac server: Allow specifying the security descriptor for a new thread.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-20 13:06:12 +02:00
Alexandre Julliard
ab182dbf06 server: No longer store the mapping object in the dll structure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-26 17:01:45 +02:00
Alexandre Julliard
a557934c76 server: Keep track of mapped memory views.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-26 17:01:44 +02:00
Alexandre Julliard
0eefa76791 ntdll: Suspend the process before attaching dlls, using the process initial context.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-19 12:43:00 +02:00
Michael Müller
a78d419420 server: Assign a default label to all tokens.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-19 09:50:32 +02:00
Sebastian Lackner
4fc5d8873c server: Do not shutdown server in persistent mode when creation of first process fails.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-19 09:48:08 +02:00
Michael Müller
7c08e787b1 server: Implement setting a security descriptor when duplicating tokens.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-15 11:12:24 +02:00
Alex Henrie
146cf041d9 ntdll: Always fill PagefileUsage counter with a nonzero value on Linux.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-17 21:57:12 +02:00
Alex Henrie
19a79f4228 ntdll: Implement ProcessVmCounters for Linux for other processes.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-09 16:37:42 -05:00
Jacek Caban
6ffe08459f server: Cancel process asyncs on process termination.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-01 15:25:34 +01:00
Jacek Caban
055918c982 server: Store async list in process object and use that to find async in cansel_async request.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-01 13:50:27 +01:00
Roman Pisl
ddfc5275af process: Make PROCESS_QUERY_LIMITED_INFORMATION sufficient for QueryFullProcessImageName().
Signed-off-by: Roman Pisl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-17 16:55:14 -07:00
Sebastian Lackner
7c06f1c218 server: Do not store unix_pid in process_snapshot struct.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-07 23:54:44 +09:00
Alexandre Julliard
80f3fda934 server: Add support for maintaining a client-side directory cache.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-02 14:39:16 +09:00
Sebastian Lackner
bae3dcc295 server: Do not hold reference on parent process.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-25 18:48:19 +09:00
Sebastian Lackner
1025ed38c0 server: Increase size of PID table and do not reuse recently freed ptids.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-25 18:48:19 +09:00
Alexandre Julliard
3ea7f7d2f4 server: Set the security descriptor at object creation.time.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-12 23:07:30 +09:00
Alexandre Julliard
ff9d90bbb0 server: Use a standard object for object attribute roots instead of a directory.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-12 23:07:30 +09:00
Alexandre Julliard
b21a324070 server: Use the link_name operation to create named objects.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-05 00:20:01 +09:00
Alexandre Julliard
f55db7882d server: Add link_name and unlink_name object operations.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-04 21:07:19 +09:00
Alexandre Julliard
37503be654 server: Fix checks for a valid directory in object attributes.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-01 14:57:37 +09:00
Alexandre Julliard
008f14f03f server: Directly return a structure in get_req_unicode_str().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-29 21:25:12 +09:00
Alexandre Julliard
ed268bbf91 server: Use a common helper function to implement open object calls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-29 21:25:12 +09:00
Alexandre Julliard
b3064d748b server: Implement NtOpenJobObject.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-29 16:38:53 +09:00
Alexandre Julliard
9504e2addf server: Add a helper function to validate and return object attributes.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-16 00:05:57 +09:00
Alexandre Julliard
7350682aa6 server: Store the attributes in the object_attributes structure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-16 00:05:57 +09:00
Sebastian Lackner
1980834c7d ntdll: ProcessDebugFlags should return debug_children flag instead of !debugger_present.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-21 18:14:43 +01:00
Sebastian Lackner
c948e84189 server: Properly inherit debug_children flag when creating new process. 2015-08-24 18:41:34 +09:00
Dmitry Timoshkov
1d2241eca3 server: For querying process information demand PROCESS_QUERY_LIMITED_INFORMATION access. 2015-08-21 14:35:01 +09:00
Dmitry Timoshkov
c19091272d server: Add implicit PROCESS_[QUERY|SET]_LIMITED_INFORMATION access. 2015-08-21 14:34:55 +09:00
Sebastian Lackner
905bf79337 server: Store correct entry point for first thread. 2015-07-30 11:37:15 +02:00
Andrew Cook
453458f294 server: Implement JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE. 2015-07-17 14:28:59 +09:00
Sebastian Lackner
a7247df6ca server: Implement waiting for job objects. 2015-04-07 23:16:20 +09:00
Andrew Cook
1d359a5827 server: Implement TerminateJobObject. 2015-04-07 23:15:47 +09:00
Andrew Cook
47ffeaee74 server: Implement io completion messages for job objects. 2015-04-03 00:33:29 +09:00
Andrew Cook
0dbe5adc21 server: Implement job inheritance. 2015-04-03 00:33:29 +09:00