From 5b9262e797fc4f5b8230a0998d99c85d15ba2443 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 14 Apr 2006 14:20:58 +0000 Subject: * 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. --- winsup/cygwin/fhandler_netdrive.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/fhandler_netdrive.cc') 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; } -- cgit v1.2.3