Alexandre Julliard
9df976766f
libport: Remove the obsolete O_LARGEFILE define.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 20:29:34 +02:00
Alexandre Julliard
a851703ed7
ntdll: Return a cleaner Unix path for z: drive in wine_nt_to_unix_file_name().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:40:14 +02:00
Charles Davis
dd882794d2
ntdll: Use posix_fallocate() instead of fallocate().
...
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 19:34:21 +02:00
Zebediah Figura
1eb56b20ba
ntdll: Explicitly return whether an async is complete in async_callback_t.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:31:20 +02:00
Zebediah Figura
1ee382c706
server: Pass the async result size as part of apc_call_t.
...
Only really an optimization (plus it makes the code a little conceptually simpler).
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:30:09 +02:00
Alexandre Julliard
61b123fae9
ntdll: Set the I/O status block through the 32-bit pointer for Wow64 processes.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-05 23:11:20 +02:00
Alexandre Julliard
28754a04ef
ntdll: Only update the I/O status block at function exit.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-05 23:11:15 +02:00
Alexandre Julliard
156c34ea03
ntdll: Add a helper function to get the iosb pointer to pass to the server.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-05 20:43:28 +02:00
Alexandre Julliard
460755a007
ntdll: Avoid some duplicate async definitions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-05 20:43:28 +02:00
Alexandre Julliard
9bf46d5ce6
ntdll: Make wine_nt_to_unix_file_name() and wine_unix_to_nt_file_name() follow NT syscall conventions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-02 22:57:38 +02:00
Alexandre Julliard
3fb4d1f779
ntdll: Always clear the returned handle in Nt object functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 17:38:32 +02:00
Alexandre Julliard
07f8b0c84a
ntdll: Avoid calling NtCreateFile() from the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-08 16:49:41 +02:00
Alexandre Julliard
f690266c11
ntdll: Add a helper function to open a file object.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-08 16:49:10 +02:00
Alexandre Julliard
92a66c08ba
ntdll: Pass a length pointer instead of an IO_STATUS_BLOCK to the async callbacks.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-08 16:21:51 +02:00
Alexandre Julliard
27ecc6ba5f
ntdll: Fix iosb handling in NtCancelIoFile().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 16:33:29 +02:00
Zebediah Figura
e759da260e
server: Use a separate request to retrieve the object name.
...
A deleted key returns STATUS_KEY_DELETED when ObjectNameInformation is
requested, but succeeds when ObjectBasicInformation is requested.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-01 22:34:31 +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
be8bd6f498
ntdll: Introduce IOCTL_WINE_AFD_COMPLETE_ASYNC.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-02 20:16:08 +02:00
Zebediah Figura
b108c1373a
ntdll: Introduce IOCTL_AFD_WINE_RECVMSG.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 11:34: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
5d3fde087a
ntdll: Move struct async_fileio to unix_private.h.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:32:59 +02:00
Zebediah Figura
97afac469f
ntdll: Avoid accessing the I/O status block in wait_async().
...
Steam uses WSASend() with completion ports, reusing OVERLAPPED structures as
soon as they are returned from GetQueuedCompletionStatus(). Since completion is
queued during the select request in wait_async(), the I/O status block can be
reused even before the call to NtDeviceIoControl exits.
This works fine with current Wine, because WSASend() doesn't access the I/O
status block after queuing completion. However, a patch that changes it to use
wait_async() like other async requests causes NtDeviceIoControlFile to
consistently return garbage status codes.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:32:28 +02:00
Sven Baars
2d218c924d
ntdll: Fix some memory leaks (Valgrind).
...
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-03 20:42:29 +02:00
Alexandre Julliard
df1c03a007
ntdll: Fix drive letter of current directory in get_full_path().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51057
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-25 16:38:08 +02:00
Rémi Bernon
b3f6f21d01
ntdll: Make sure unix_name is zero terminated (valgrind).
...
In nt_to_unix_file_name_no_root.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-22 10:30:52 +02:00
Gijs Vermeulen
749f8c25e2
ntdll: Return STATUS_INFO_LENGTH_MISMATCH when len is too small in NtQueryObject(ObjectBasicInformation).
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50791
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-16 22:39:46 +02:00
Alexandre Julliard
4e6da5942e
ntdll: Get rid of the rebuild_nt_name() helper.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 17:30:50 +02:00
Alexandre Julliard
7ef35b3393
ntdll: Reimplement file system redirection using NT pathname comparisons.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 17:30:50 +02:00
Alexandre Julliard
35cd411547
ntdll: Always pass object attributes to nt_to_unix_file_name().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 17:04:35 +02:00
Alexandre Julliard
90024e492d
ntdll: Move nt_to_unix_file_name_attr() to avoid forward declarations.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 17:04:35 +02:00
Alexandre Julliard
060b28b9ba
ntdll: Allow a second backslash after the drive letter.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 17:04:35 +02:00
Alexandre Julliard
405666b736
ntdll: Reject NT path names that are not in canonical form.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-13 13:05:29 +02:00
Alexandre Julliard
302d44004e
ntdll: Reuse the Unix name buffer for get_dos_device().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-13 13:05:29 +02:00
Alexandre Julliard
cdb1f3ae55
ntdll: Cleanup the path with collapse_path() in unix_to_nt_file_name().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:32:15 +02:00
Alexandre Julliard
7929b21ede
ntdll: Define NtCurrentTeb64() on 64-bit to avoid some #ifdefs.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 12:25:21 +02:00
Alexandre Julliard
28fe84da45
ntdll: Load the main image from the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:49 +01:00
Rémi Bernon
0eb3258a69
ntdll: Initialize mountmgr_unix_drive before NtDeviceIoControlFile (valgrind).
...
Syscall param writev(vector[...]) points to uninitialised byte(s)
at 0x4189DA3: writev (writev.c:26)
by 0x46A5A1B: send_request (server.c:213)
by 0x46A5A1B: server_call_unlocked (server.c:273)
by 0x46CA54F: virtual_locked_server_call (virtual.c:2993)
by 0x4681C9A: server_ioctl_file (file.c:4789)
by 0x468B326: NtDeviceIoControlFile (file.c:5620)
by 0x468B7AF: get_mountmgr_fs_info (file.c:1986)
by 0x468B7AF: get_mountmgr_fs_info (file.c:1955)
by 0x468FCBB: NtQueryVolumeInformationFile (file.c:6483)
by 0x4677E88: __wine_syscall_dispatcher_xsave (in /home/rbernon/Code/build-wine/wine64/dlls/ntdll/ntdll.so)
by 0x7BC0DEB3: NtQueryVolumeInformationFile (in /home/rbernon/Code/build-wine/wine64/dlls/ntdll/ntdll.dll)
by 0x7B01F127: GetFileInformationByHandle (file.c:2938)
by 0x7096A5C3: _fstat64 (file.c:1791)
by 0x7096A941: _fstat64i32 (file.c:1877)
Address 0x7ffffe30e520 is in a rw- anonymous segment
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Roman Pišl
dabba3cc86
ntdll: Don't set error status if volume serial number is missing.
...
Fixes regression from b14eee69c7
.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50781
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Alexandre Julliard
16b0994412
ntdll: Make the open_hkcu_key() helper available globally.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 10:42:35 +01:00
Alexandre Julliard
285830f5ec
ntdll: Add a helper to initialize a UNICODE_STRING on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 10:42:34 +01:00
Alexandre Julliard
305cb8af27
ntdll: Initialize the ShowDotFiles option on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 16:15:26 +01:00
Erich E. Hoover
1b48335762
ntdll: Allow NtQueryVolumeInformationFile to make async volume information queries.
...
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:08 +01:00
Erich E. Hoover
09c67c4809
ntdll: Use st_rdev for special devices in get_mountmgr_fs_info.
...
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:07:09 +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
76b3284388
ntdll: Pass the NT name in the create_file request.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 13:29:57 +01:00
Alexandre Julliard
b6f774df69
server: Add a request to return all object types.
...
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
Sebastian Lackner
43de1407e9
ntdll: Return STATUS_INVALID_DEVICE_REQUEST when trying to call NtReadFile on directory.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:21 +01:00
Alexandre Julliard
dc4e881834
server: Add support for object counts in the object type information.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 23:11:22 +01:00
Zebediah Figura
690a069918
ntdll: Treat '>' the same as '?' in match_filename().
...
They differ in strange ways, as the tests show, but the basic behaviour of '>' is similar to '?'.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22635
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 09:15:37 +01:00