* 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:
Corinna Vinschen
2010-08-20 11:18:58 +00:00
parent dd442880af
commit a6c83569dc
3 changed files with 115 additions and 38 deletions

View File

@ -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;