* fhandler_disk_file.cc (readdir_check_reparse_point): Rename from
is_volume_mountpoint. Return valid d_type value for underlying reparse point type. (readdir_get_ino): Don't rely on the handle set in pc.check. Open file here if pc.handle() is NULL. (fhandler_disk_file::readdir_helper): Try to set a correct d_type value more diligent. (fhandler_disk_file::readdir): Don't reset dirent_set_d_ino unless we're really sure it's due to an untrusted FS. Simplify usage of FileAttributes, which is 0 if buf is NULL, anyway. Set d_type correctly for faked "." and ".." entries. Improve debug output. * path.cc (symlink_info::check): Don't keep handle to volume mount point open. Explain why.
This commit is contained in:
@ -2533,6 +2533,11 @@ restart:
|
||||
This does what we want because fs_info::update opens the
|
||||
handle without FILE_OPEN_REPARSE_POINT. */
|
||||
fs.update (&upath, NULL);
|
||||
/* Make sure the open handle is not used in later stat calls.
|
||||
The handle has been opened with the FILE_OPEN_REPARSE_POINT
|
||||
flag, so it's a handle to the reparse point, not a handle
|
||||
to the volumes root dir. */
|
||||
pflags &= ~PC_KEEP_HANDLE;
|
||||
}
|
||||
else if (res)
|
||||
break;
|
||||
|
Reference in New Issue
Block a user