Commit Graph

181 Commits

Author SHA1 Message Date
Alexandre Julliard 990cc1c64b server: Define a server-side structure for SID.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 12:32:11 +01:00
Zebediah Figura 484b78bda0 ntoskrnl: Report the initial status of an IRP separately from the IOSB status.
Based on a patch by Chip Davis.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30155
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-13 11:32:18 +02:00
Zebediah Figura a1c42293a2 server: Don't wake up always-blocking asyncs.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 22:30:45 +02:00
Zebediah Figura 4f1c7ba5f9 server: Cancel asyncs through fd_ops.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 22:30:45 +02:00
Zebediah Figura b1e4d920c3 server: Return void from the ioctl callback.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 23:19:43 +02:00
Zebediah Figura a36e2769c9 server: Return void from the flush callback.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 23:19:41 +02:00
Zebediah Figura 377d18c7b1 server: Return void from the write callback.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 23:19:41 +02:00
Zebediah Figura 6d49991188 server: Return void from the read callback.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 23:19:40 +02:00
Zebediah Figura 6cc36a46ff server: Return void from the get_volume_info callback.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 23:19:39 +02:00
Zebediah Figura 15b8f91e24 server: Check the status code to determine whether the async has failed.
Instead of manually specifying success or failure.

Based on test_return_status() in ntoskrnl. The changes in this patch don't
affect device IRPs, but the tests show the heuristic that Windows uses, and in
practice it turns out to be correct for all known asyncs.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 23:19:36 +02:00
Zebediah Figura dd58bf9ce2 server: Use a separate function and flag to communicate that the initial status of an async is not known yet.
Mostly just to simplify the interface, so that we don't need to use the return
value to communicate this.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 21:43:04 +02:00
Zebediah Figura 559a8cea57 server: Add a helper to call async_request_complete() while allocating new memory.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-02 10:22:49 +02:00
Zebediah Figura 96593370cd server: Introduce a helper to fill an iosb and terminate the async.
For convenience, and to centralize the STATUS_ALERTED logic into one place.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-02 10:22:16 +02:00
Zebediah Figura fd4e7703e9 server: Do not create an iosb for IRP calls not associated with an async.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-02 10:21:18 +02:00
Qian Hong 4e84a553a8 ntdll: Truncate files through the server.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-29 12:37:25 +02:00
Zebediah Figura 8c26fca5c2 server: Don't rely on async_is_blocking() to determine whether IOCTL_AFD_WINE_ADDRESS_LIST_CHANGE should block.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-07 21:41:15 +02:00
Zebediah Figura b8f4061df0 ntdll: Implement IOCTL_AFD_RECV.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50366
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:34:32 +02:00
Zebediah Figura 101082253f server: Do not forbid closing fd handles in other processes.
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
Erich E. Hoover 61d7629ba4 server: Allow volume information queries to be asynchronous.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 16:09:03 +01:00
Zebediah Figura 61abc500f5 server: Use a callback to free the accept_req structure.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 15:35:46 +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 bb00942671 server: Store the NT name in the fd object.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 14:17:51 +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 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 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 8fa03e494a server: Create the NLS section object for the l_intl.nls file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-27 18:28:35 +01:00
Zebediah Figura 93fb921ca7 ws2_32: Use server-side async I/O in accept().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-20 22:54:02 +02:00
Alexandre Julliard 5c4d6cf837 server: Pass all creation arguments to the device creation functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-23 11:35:16 +02:00
Zebediah Figura 3ad1739bc8 server: Create the Afd device.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 14:04:45 +02:00
Zebediah Figura 820d703c31 server: Remove no longer used is_fd_signaled().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-11 16:57:42 +02:00
Jacek Caban 6898bdca94 server: Introduce ConDrv device.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-26 21:51:18 +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
Alexandre Julliard 1ae1088964 server: Update shared user data timestamps on every request.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-25 20:28:15 +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
Piotr Caban af89b53cef server: Use monotonic clock for SetTimer timeouts.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-09 21:04:04 +02:00
Piotr Caban f016a96345 server: Use monotonic clock for relative timeouts.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-09 21:04:04 +02:00
Piotr Caban 9bfbb48662 server: Initialize current_time before it's used in init_registry.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-09 21:04:04 +02:00
Zebediah Figura 4a43546b34 server: Fix up executable permissions when renaming files.
Same as MoveFileWithProgressW().

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:18 +01:00
Jacek Caban a55a287cab server: Always block overlapped device requests until driver dispatches them.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-23 22:18:32 +02:00
Jacek Caban 6531f79d8d server: Return proper object type for mailslot and device files.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 14:27:25 +01:00
Jacek Caban 43cdcc0794 server: Use file mode flags in async_handoff to decide if request is blocking.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 17:15:00 +01:00
Jacek Caban f7f9bf9823 server: Introduce is_fd_overlapped() helper.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 17:14:55 +01:00
Sebastian Lackner c0996553a1 server: Support FILE_SKIP_COMPLETION_PORT_ON_SUCCESS on server-side asyncs.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38960
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-25 20:32:03 +02:00
Jacek Caban 04094a6669 server: Use server_get_file_info for all info classes not implemented on client side.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-24 16:58:08 +02:00
Jacek Caban 36c6a16c62 server: Use pipe_end_get_file_info for FilePipeLocalInformation implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-17 10:01:10 +02:00
Jacek Caban 584ffc2341 server: Don't use set_no_fd_status for error handling in pipe objects.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 10:49:07 +02:00
Jacek Caban 6b08e60f03 server: Introduce get_file_info request for server-side NtQueryInformationFile implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-22 12:19:43 +01:00
Alexandre Julliard c583953b95 server: Use the correct process when looking for a mapped dll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-03 11:59:20 +02:00
Jacek Caban 2ab2f31f18 server: Allow server side NtQueryVolumeInformationFile implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-03 09:39:52 +02:00