Commit Graph

252 Commits

Author SHA1 Message Date
Zebediah Figura 7b32a327f8 server: Allocate enough space for the backslash in dup_nt_name() (Valgrind).
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 09:23:25 +01:00
Huw Davies 6fdae1979b configure: Stop checking for poll.h and sys/poll.h - always use poll.h.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-31 17:56:54 +01:00
Alexandre Julliard c954e5b9e6 server: Avoid using wine/port.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 18:03:11 +02:00
Zebediah Figura cc7e3ec8e2 server: Create pseudo-fds as initially signaled.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:30:29 +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 dd9eacff4e server: Fill the TimeZoneBias member of KSHARED_USER_DATA.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-06 14:53:27 +02:00
Zebediah Figura 09dd801291 server: Add helper functions to perform atomic stores.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-06 14:53:11 +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
Luke Deller a87bafc5b9 server: Implement file access hints using posix_fadvise.
Signed-off-by: Luke Deller <luke@deller.id.au>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-24 20:51:42 +02:00
Huw Davies 68b840953d server: Remove check for macOS version < 10.5.
Our stated minimum requirement is 10.8.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-19 11:16:59 +02:00
Qian Hong be55038f3d server: Forbid shrinking files which are mapped to memory.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-29 12:39:35 +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
Qian Hong 73d0bb7740 server: Forbid deleting files with an open mapping.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-28 19:43:27 +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 737fe1f993 server: Allow polling on an fd after it was removed.
In particular, so that we can wait for POLLOUT on a connecting socket multiple
times, in case the first connection fails, without polling on it while it is
unconnected.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 09:56:23 +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
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 9e255ba4e0 ntdll: Pass the NT name in the set_fd_name_info request.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 13:40:56 +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 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
Piotr Caban 3541deb0c3 server: Don't overflow if timeout doesn't fit into int range in get_next_timeout.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 12:59:04 +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
Daniel Lehman a302ab44ac server: Fail if non-empty directory marked for deletion.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +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
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 2b3904d233 server: Check whether the new file name is executable.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 12:09:09 +02:00
Zebediah Figura a20d8bda37 server: Store the real Unix path.
So that we can query the Unix symlink target from a file handle.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 12:13:44 +01: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
Zebediah Figura 6971fd2d61 server: Allow renaming a file to the same name.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:18 +01:00
Zebediah Figura ee136f9832 ntdll: Check for an existing file on the server side.
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 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
Dmitry Timoshkov ee02007967 server: Track separately implicit and explicit file disposition.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-09 21:08:09 +01:00
Dmitry Timoshkov 1affd75fcb server: Allow setting delete disposition on a read-only directory.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-09 21:08:09 +01:00
Jacek Caban 3dacf82173 server: Add FILE_SKIP_SET_EVENT_ON_HANDLE support.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-01 21:50:57 +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
Jacek Caban 2adfa93a7f server: Add FileModeInformation implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45749
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-29 17:02:14 +01:00
Sebastian Lackner 18e074b0f3 server: Support FILE_SKIP_COMPLETION_PORT_ON_SUCCESS on client-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
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
Sebastian Lackner 2f17e0112d ntdll: Add setting FileIoCompletionNotificationInformation implementation.
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 66e20ce576 server: Add NtQueryInformationFile(FileIoCompletionNotificationInformation) implementation.
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 8b8eba7e6c server: Use default_fd_get_file_info for FileAccessInformation implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-24 16:58:08 +02:00