summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_netdrive.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-04-14 14:20:58 +0000
committerCorinna Vinschen <corinna@vinschen.de>2006-04-14 14:20:58 +0000
commit5b9262e797fc4f5b8230a0998d99c85d15ba2443 (patch)
tree8b0f28c8affe10961810b5e99c1dcdccb42e382e /winsup/cygwin/fhandler_netdrive.cc
parent04cbcde8d9a0feec9bc8530279bf4c432f739e00 (diff)
downloadcygnal-5b9262e797fc4f5b8230a0998d99c85d15ba2443.tar.gz
cygnal-5b9262e797fc4f5b8230a0998d99c85d15ba2443.tar.bz2
cygnal-5b9262e797fc4f5b8230a0998d99c85d15ba2443.zip
* fhandler_disk_file.cc (path_conv::hasgood_inode): Make inline.
Drop remote fs handling entirely since unreliable inode numbers are now recognized differently. (path_conv::is_samba): Make inline. (fhandler_disk_file::opendir): Reformat comment. (fhandler_base::fstat_helper): Special case remote file systems returning (unreliable) 32 bit inode numbers. (fhandler_base::readdir): Ditto. * fhandler_netdrive.cc (fhandler_netdrive::readdir): Ditto.
Diffstat (limited to 'winsup/cygwin/fhandler_netdrive.cc')
-rw-r--r--winsup/cygwin/fhandler_netdrive.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_netdrive.cc b/winsup/cygwin/fhandler_netdrive.cc
index 1cabce8b1..975caf105 100644
--- a/winsup/cygwin/fhandler_netdrive.cc
+++ b/winsup/cygwin/fhandler_netdrive.cc
@@ -209,7 +209,14 @@ fhandler_netdrive::readdir (DIR *dir, dirent *de)
if (strlen (get_name ()) == 2)
de->d_ino = hash_path_name (get_namehash (), de->d_name);
else
- de->d_ino = readdir_get_ino (dir, nro->lpRemoteName, false);
+ {
+ de->d_ino = readdir_get_ino (dir, nro->lpRemoteName, false);
+ /* We can't trust remote inode numbers of only 32 bit. That means,
+ all remote inode numbers when running under NT4, as well as
+ remote NT4 NTFS, as well as shares of Samba version < 3.0. */
+ if (de->d_ino <= UINT_MAX)
+ de->d_ino = hash_path_name (0, nro->lpRemoteName);
+ }
res = 0;
}