Commit graph

184 commits

Author SHA1 Message Date
Brendan Shanks
c8f9ee0bf0 configure: Remove DiskArbitration.framework check (always present on macOS). 2022-12-02 11:04:45 +01:00
Rémi Bernon
77d2f6ae74 mountmgr.sys: Allocate UNICODE_STRING buffers with RtlAllocateHeap. 2022-12-01 22:45:52 +01:00
Alex Henrie
61dc7de497 mountmgr: Use standard C functions for memory allocation. 2022-11-30 10:51:59 +01:00
Brendan Shanks
2d4b588afc mountmgr.sys: Free wine_get_dos_file_name memory with HeapFree. 2022-11-29 21:33:58 +01:00
Alexandre Julliard
14d411b8a0 mountmgr.sys: Use the Unix call helpers. 2022-11-24 22:20:20 +01:00
Joel Holdsworth
7546b4a63d mountmgr.sys: Implemented FileFsSizeInformation and FileFsFullSizeInformation volume queries.
This patch fixes GetDiskFreeSpaceA/W when an NT-style GUID volume path is
provided e.g. "\\?\Volume{00000000-0000-0000-0000-000000000043}\" as might be
retrieved by FindFirstVolumeA/W and FindNextVolumeA/W.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53547
Signed-off-by: Joel Holdsworth <joel@airwebreathe.org.uk>
2022-09-01 17:49:33 +02:00
Alexandre Julliard
3110b72e12 mountmgr: Don't crash if connecting to dbus fails. 2022-08-17 16:45:57 +02:00
Tim Clem
6c465ae8ef mountmgr.sys: Always set the return size from dhcp_request implementations.
Also return STATUS_SUCCESS rather than 0 in early-out cases.

Signed-off-by: Tim Clem <tclem@codeweavers.com>
2022-07-05 22:23:18 +02:00
Alexandre Julliard
194e09baec makefiles: Add separate variables for Unix flags and libraries.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-29 23:23:41 +02:00
Rémi Bernon
808d4a77f7 mountmgr.sys: Avoid passing a stack pointer to the run_loop thread.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-05 18:35:44 +02:00
Huw Davies
1c04073772 mountmgr: Fix long type warnings on macOS.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-25 17:53:09 +01:00
Eric Pouech
9035f66c68 mountmgr.sys: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 11:04:19 +01:00
Huw Davies
02b9dee237 mountmgr: Fix long type warning.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-02 18:43:10 +01:00
Alexandre Julliard
f0cd33c69e include: Add support for defining Win32 types as 'long' where possible.
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Alexandre Julliard
ae2693e2c4 include: Use long type by default in GUID definition.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 17:56:07 +01:00
Alex Henrie
656d7f58a1 mountmgr: Change scope of variable pvd in VOLUME_GetSuperblockLabel (cppcheck).
The data in pvd was being accessed through the label_ptr variable after
pvd went out of scope.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-20 21:16:42 +01:00
Paul Gofman
b65ed8fa9b mountmgr.sys: Avoid use after free in dhcp4_config_request().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-14 20:56:09 +01:00
Alexandre Julliard
e5d69d9ee6 configure: Assume that sys/ioctl.h is available on Unix.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 18:43:51 +01:00
Alexandre Julliard
5554c847e1 mountmgr: Use the ntdll Unicode string functions instead of wine/unicode.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-30 22:07:20 +01:00
Alexandre Julliard
f98d956e52 mountmgr: Use wide character string literals.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-29 23:25:46 +01:00
Alexandre Julliard
406309e133 mountmgr: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-29 23:25:46 +01:00
Alexandre Julliard
fd5acd68b0 mountmgr: Move the macOS device access check to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-29 23:25:46 +01:00
Alexandre Julliard
e54f6d8f8f mountmgr: Move the macOS credentials support to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-29 23:25:44 +01:00
Alexandre Julliard
236a1bc8f0 mountmgr: Move the DiskArbitration support to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 18:07:30 +01:00
Alexandre Julliard
95615a4afb mountmgr: Move the DBus support to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 18:07:30 +01:00
Alexandre Julliard
c210a0e607 mountmgr: Return a Unix file name in the IOCTL_MOUNTMGR_QUERY_SYMBOL_FILE request.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 18:07:30 +01:00
Alexandre Julliard
9d293a1e9b mountmgr: Put the Unix helpers in a separate Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-25 21:19:45 +01:00
Alexandre Julliard
af7b364a28 mountmgr: Move the macOS credentials support to a separate file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-25 21:19:45 +01:00
Alexandre Julliard
086e9e0eda mountmgr: Add some helpers to abstract the Unix calls from mountmgr.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-25 18:21:55 +01:00
Alexandre Julliard
9c587c5099 mountmgr: Add some helpers to abstract the Unix calls from device.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-25 18:21:55 +01:00
Alexandre Julliard
88cde9e717 mountmgr: Pass the SCSI device information when creating a volume.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-25 12:38:59 +01:00
Alexandre Julliard
37b7259f07 mountmgr: Remove the obsolete libhal support.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-25 12:38:59 +01:00
Alexandre Julliard
dbe3269c9d mountmgr: Pass a Unix interface name in the dhcp_request_params ioctl.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-25 12:38:59 +01:00
Alexandre Julliard
ef9a0f3bc3 include: Don't include stdlib.h in wine/port.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-03 21:06:48 +01:00
Alexandre Julliard
341cb1a933 include: Don't include fcntl.h in wine/port.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-30 22:36:22 +02:00
Alexandre Julliard
c27832d717 include: Don't include sys/stat.h in wine/port.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-30 22:34:28 +02:00
Alexandre Julliard
6ba7773121 makefiles: Add a -mcygwin flag to specify the inverse of -mno-cygwin.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Alexandre Julliard
b3ea395681 mountmgr: Support $HOME paths to define shell folders.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-17 16:50:00 +02:00
Alexandre Julliard
fefb5da4ba mountmgr: Make creating a backup optional for shell folders.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-17 16:49:30 +02:00
Alexandre Julliard
0a8776d455 mountmgr: Add requests to query and set shell folder symbolic links.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-07 21:35:54 +02:00
Zebediah Figura
56104123d9 mountmgr: Return STATUS_BUFFER_OVERFLOW if an insufficient buffer is passed to IOCTL_MOUNTMGR_ENUMERATE_CREDENTIALS.
STATUS_MORE_ENTRIES is used for directory enumeration APIs, and signals that a
continuation will be returned on the next call.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 10:57:21 +02:00
Zebediah Figura
33ed41950d mountmgr: Return STATUS_BUFFER_OVERFLOW if an insufficient buffer is passed to IOCTL_MOUNTMGR_QUERY_DHCP_REQUEST_PARAMS.
STATUS_MORE_ENTRIES is used for directory enumeration APIs, and signals that a
continuation will be returned on the next call.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 10:57:19 +02:00
Zebediah Figura
a200c47c32 mountmgr: Return STATUS_BUFFER_OVERFLOW if an insufficient buffer is passed to IOCTL_MOUNTMGR_QUERY_POINTS.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 10:57:16 +02:00
Zebediah Figura
17ebac8482 mountmgr: Validate the output size for IOCTL_MOUNTMGR_QUERY_POINTS.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 10:57:11 +02:00
Huw Davies
76b31a2ed8 mountmgr: Retrieve the unix-name from the alias.
If, at some point, we change that, we can add a Wine-only nsi table
that holds the luid to unix-name mapping.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 11:34:08 +02:00
Huw Davies
e5b90e93b2 dhcpcsvc: Pass a luid instead of the adapter name.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 11:33:53 +02:00
Huw Davies
715edfb0b2 mountmgr.sys: Move dhcp lookup to a worker thread.
While this is a reasonable change per se, the motivation is to avoid a
deadlock when mountmgr.sys calls into iphlpapi and further into
nsiproxy.sys via the nsi device.  nsiproxy.sys is hosted by the same
process as mountmgr.sys so is unable to handle the request while
it is also waiting for that same request to return.

The correct long-term solution is for mountmgr.sys to call the
netio.sys versions of the iphlpapi functions.  These will call the
kernel-side versions of the nsi functions without going through the
nsi device.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-06 16:06:51 +02:00
Erich E. Hoover
3fcfbbf55a mountmgr.sys: Simplify query_unix_drive.
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-03-26 16:48:42 +01:00
Erich E. Hoover
5a6c82e9e3 mountmgr.sys: Move query_unix_drive to drive.c.
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-03-26 16:48:42 +01:00
Erich E. Hoover
d896c2201f mountmgr.sys: Add support for 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:20:42 +01:00