Commit Graph

187 Commits

Author SHA1 Message Date
Akihiro Sagawa f9a5ad1348 ntdll: Treat CIFS/SMB2 file systems as remote devices.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-02 10:14:13 +02:00
Alex Henrie b1203af6ba mountmgr: Create devices and registry entries for parallel ports.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-02 22:49:44 +02:00
Alex Henrie a6cdfea1c1 mountmgr: Create devices and registry entries for serial ports.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-02 22:49:44 +02:00
Michael Gilbert 29fdc48790 ntdll: Add missing stdint.h include for kfreebsd architectures.
Signed-off-by: Jens Reyer <jre.winesim@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 21:35:26 +09:00
Matt Robinson 4a6bd3d200 ntdll: Catch page fault in RtlWow64EnableFsRedirectionEx.
Signed-off-by: Matt Robinson <git@nerdoftheherd.com>
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-08 12:39:18 +09:00
Sebastian Lackner bb48b11508 ntdll: Fix buffer allocation check in get_dir_data_space.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-05 01:27:50 +09:00
Alexandre Julliard 6261e26764 ntdll: Support remaining information classes in NtQueryDirectoryFile.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-05 01:27:50 +09:00
Alexandre Julliard 12fc123338 ntdll: Cache the entire directory contents and sort the names before returning files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-04 01:03:26 +09:00
Sebastian Lackner f4f33686cb ntdll: Make sure buffer allocated in get_cached_dir_data is big enough for returned entry.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-03 10:14:25 +09:00
Alexandre Julliard 1c31ba252c ntdll: Store the directory identity and search mask in the directory cache.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-02 18:30:11 +09:00
Alexandre Julliard a4dcfd1195 ntdll: Add tests for buffer overflows in NtQueryDirectoryFile.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-29 00:54:08 +09:00
Seong-ho Cho ca8a08606d configure: Add AC_HEADER_MAJOR to find where major() is defined.
Signed-off-by: Seong-ho Cho <darkcircle.0426@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-18 18:06:46 +09:00
Jacek Caban 443c2a4719 ntdll: Pass SYNCHRONIZE flag in NtOpenFile and NtCreateFile calls.
This is needed by Office 2013, which hooks those functions and expects
flag to be set.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 20:36:17 +09:00
Alex Henrie 48f3bacb0b ntdll: Avoid double initialization.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-22 22:25:39 +09:00
Alex Henrie 65942760c4 ntdll: Increase maximum number of autodetected COM/LPT ports to 256.
Windows autodetects up to 256 serial ports and 256 parallel ports per
system.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-25 12:04:40 +01:00
Piotr Caban a8ef261493 ntdll: Fix NtQueryDirectoryFile behavior on short file names on case insensitive file systems.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-21 20:26:48 +01:00
Francois Gouget 67c2e06fcd ntdll: Work around a conflict between Wine and Solaris list.h.
Signed-off-by: Francois Gouget <fgouget@free.fr>
2015-10-05 22:27:16 +09:00
Michael Müller 00d966cd3a ntdll: Return STATUS_OBJECT_NAME_INVALID in wine_nt_to_unix_file_name for prefix-only paths.
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
2015-10-02 18:11:31 +09:00
Ken Thomases 3b74ac0f08 ntdll: Fix the "not found" status set by read_directory_stat() and read_directory_getattrlist() for when restart_scan is set. 2015-06-12 21:22:42 +09:00
Ken Thomases e7fa766378 Revert "ntdll: Avoid one of the calls to getattrlist() when read_directory_getattrlist() checks the case sensitivity of the file system.".
This was wrong-headed and could never have worked.  The second getattrlist()
call that I was trying to avoid was only necessary when the first fails.  Given
that the first failed, its results can't be used to avoid the second, no matter
what information we requested.

This reverts commit 5514df9d4e.
2015-06-12 21:22:42 +09:00
Ken Thomases 5514df9d4e ntdll: Avoid one of the calls to getattrlist() when read_directory_getattrlist() checks the case sensitivity of the file system.
Extract a new function, get_dir_case_sensitivity_attr_by_id(), from
get_dir_case_sensitivity_attr().  Call that instead of get_dir_case_sensitivity()
from read_directory_getattrlist().  We get the device and file system IDs from
the same getattrlist() call we're already doing, so that avoids an extra call.
2015-05-22 14:11:03 +09:00
Alexandre Julliard ee1528040e ntdll: Remove the special case for the NUL device. 2015-05-21 17:38:19 +09:00
Ken Thomases bb89f10e5e ntdll: Fix read_directory_getattrlist() to get the name of a symlink rather than its target, but still detect if the symlink is broken. 2015-05-21 13:59:56 +09:00
Ken Thomases 5c98448aa3 ntdll: If read_directory_getattrlist() finds that the file doesn't exist, return successful "no file" result to stop search. 2015-05-21 13:58:01 +09:00
Ken Thomases f6926b3515 ntdll: Increase name buffer size in read_directory_getattrlist() for UTF-8 encoding.
The docs for getattrlist() say that ATTR_CMN_NAME can return up to NAME_MAX + 1
Unicode characters (code points) encoded in UTF-8, which means it can be up to
NAME_MAX * 3 + 1 bytes.
2015-05-21 13:57:45 +09:00
Matteo Bruni 2f0febe60a ntdll: Ignore positive matches in read_directory_stat() for case-insensitive filesystems.
It's necessary to return the actual filename with correct casing and a
plain stat doesn't allow that. Make read_directory_stat() return the
result of the stat() call on a case-insensitive filesystem only when the
file is missing.
2015-05-20 17:32:16 +09:00
Matteo Bruni 5d65b9d0c2 ntdll: Implement a read_directory_getattrlist() function.
When searching for a specific filename on a case-insensitive filesystem
we first try with stat(). If stat() does find the file we currently
return the requested filename back.

That presents an issue when the application cares about the casing of the
actual file stored on-disk. Specifically, NtQueryDirectoryFile is
supposed to return the actual filename with correct casing.

One possible solution to the issue, without having to resort to manually
scanning the directory entries, is to make use of the OS X getattrlist()
function, since it can return the filename stored on the filesystem.
2015-05-20 17:32:09 +09:00
Francois Gouget ca1545cf17 ntdll: Remove unneeded NONAMELESSXXX directives. 2015-03-16 15:04:50 +09:00
Alexandre Julliard ff84bf8bdd ntdll: Move NtNotifyChangeDirectoryFile to file.c and make it use the standard fileio structure. 2015-03-02 23:00:28 +09:00
Erich E. Hoover ca51e113e4 ntdll: Unify retrieving the attributes of a file. 2014-12-17 19:42:23 +01:00
André Hentschel 6d50cfcac2 ntdll: Use a dynamic buffer for change notification data. 2014-09-23 17:17:11 +02:00
Felix Janda 3ae113a957 ntdll: getdents64 might have been defined previously. 2014-09-05 15:26:55 +02:00
Ken Thomases a14ed527d8 ntdll: In find_file_in_dir(), don't test directory entries' short names if the target name isn't a short name.
hash_short_file_name() will always create a short name of at least 8 characters
with the 5th being a tilde (~).  If the target name isn't of that form, then it
can never match any short name constructed from the directory entries.
2014-07-30 11:31:55 -05:00
Martin Storsjo 8cb42d4135 ntdll: Align FILE_*_DIRECTORY_INFORMATION structs to 8 bytes. 2014-05-15 19:04:56 +02:00
Martin Storsjo 114444ca9c ntdll: Don't write uninitialized bytes at the end of filenames. 2014-05-15 19:04:55 +02:00
Huw Davies ac79e160e7 ntdll: For Android look in /proc/mounts for mounted file systems. 2014-04-07 15:34:44 +02:00
Huw Davies 2139df003f ntdll: Add a replacement getmntent for Android.
Bionic has a stub function named getmntent which outputs an unimplemented message.
2014-04-07 15:34:43 +02:00
Frédéric Delanoy 502fc1aef9 ntdll: Use boolean type where appropriate. 2013-12-09 11:45:50 +01:00
Huw Davies fed9f67bc4 ntdll: Don't reduce the size of the local buffer when we come to read another batch of entries.
In the wildcard case, we can't know how much to reduce it by anyway.
2013-12-03 19:40:22 +01:00
Frédéric Delanoy 86fdca6750 ntdll: Use BOOL type where appropriate. 2013-10-30 09:45:20 +01:00
Alexandre Julliard 6666614a19 ntdll: Actually return the mount point in get_device_mount_point on Mac OS. 2013-09-04 16:28:10 +02:00
Alexandre Julliard d191d5bca0 ntdll: Use a RunOnce function to initialize directory lookup options. 2013-08-29 19:56:18 +02:00
Alexandre Julliard 581cef082e ntdll: Use fclose instead of endmntent since we use fopen anyway. 2013-07-29 21:07:12 +02:00
Alexandre Julliard 96b7c71cfe ntdll: Leave NtQueryDirectoryFile early when a non-wildcard mask is used in the getdirentries case.
This avoids having to retry the getdirentries call which may fail if
the buffer size is too small.
2013-07-01 19:51:20 +02:00
Andrew Talbot d0d28b96a4 ntdll: Avoid signed-unsigned integer comparisons. 2013-02-21 08:34:13 +01:00
Alexandre Julliard 606c88a348 ntdll: Use the __NR_ names for Linux system calls. 2013-01-21 21:37:02 +01:00
Alexandre Julliard 90e90e3b6a ntdll: Make the page_size variable global. 2013-01-08 16:35:30 +01:00
Vincas Miliūnas 6314cf0295 kernel32: Added implementation of FileIdBothDirectoryInfo for GetFileInformationByHandleEx. 2012-10-12 13:14:43 +02:00
André Hentschel aac478f51b ntdll: Catch bad pointers in RtlWow64EnableFsRedirectionEx. 2012-08-22 12:11:19 +02:00
André Hentschel 54a9c0fc60 ntdll: Add a helper function that returns the record length of a dirent struct. 2012-06-04 12:17:56 +02:00