summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-08-20 11:18:58 +0000
committerCorinna Vinschen <corinna@vinschen.de>2010-08-20 11:18:58 +0000
commita6c83569dc3770c303e92b2ff56a9fb0a6c7a128 (patch)
treee4967490142dd3b86c1fd6269f3a7b470679d0e3 /winsup/cygwin/path.cc
parentdd442880afd7e5b4fcd4cfea35c010dbd24f8266 (diff)
downloadcygnal-a6c83569dc3770c303e92b2ff56a9fb0a6c7a128.tar.gz
cygnal-a6c83569dc3770c303e92b2ff56a9fb0a6c7a128.tar.bz2
cygnal-a6c83569dc3770c303e92b2ff56a9fb0a6c7a128.zip
* 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.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 00a9c1d65..fb4526fd5 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -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;