On Jul 28 12:52, Sam Nelson wrote: > Our main fileserver is Solaris running TotalNet Advanced Server (TAS), > which is `Samba-like, but not Samba' from the Windows PoV at least. In
Means what? Samba is recognized by the fact that the file system returns "NTFS" as file system type, plus a specific set of file system flags fs_flags & ~(FILE_VOLUME_QUOTAS | FILE_SUPPORTS_OBJECT_IDS | FILE_UNICODE_ON_DISK) == (FILE_CASE_SENSITIVE_SEARCH | FILE_CASE_PRESERVED_NAMES | FILE_PERSISTENT_ACLS) the type or the flags don't match, it's not Samba from Cygwin's POV. This could be the case for old Samba versions before 3.0 and derived products. But read on. > When I run `strace ls' (the TAS-mounted filesystem is H:\ in this case) I > get the following (excerpt): > > ---------------------------------------------------------------- > [...] > 747 153425 [main] ls 1624 geterrno_from_win_error: windows error 50 == > errno 88 > 376 153801 [main] ls 1624 fhandler_disk_file::readdir: 88 = readdir > (0x692AB0, 0x22C6D4) (***) Unfortunately the strace output in 1.5.x doesn't show us the exact NT status code which has been returned by NtQueryDirectoryFile. I *assume* your TAS doesn't support the FileIdBothDirectoryInformation info class at all and chokes heavily on that for some reason. Usually, if NtQueryDirectoryFile(FileIdBothDirectoryInformation) fails with one of three status codes (STATUS_INVALID_LEVEL, STATUS_INVALID_PARAMETER, STATUS_INVALID_INFO_CLASS), Cygwin falls back to the good old FileBothDirectoryInformation info class. This doesn't seem to happen (though I can't be sure from the strace). Two possible reasons come to mind: - The status code returned by TAS is not one of those three - The status code returned by TAS is one of those three, but the first call with FileIdBothDirectoryInformation has screwed up TAS for some reason. You need to debug this further for a solution. What you should do: - Fetch the source code of a small test application called GetVolInfo from http://cygwin.de/GetVolInfo.c Build it with `gcc -g -o GetVolInfo GetVolInfo.c -lntdll' and run it like this: `./GetVolInfo /cygdrive/h'. Paste the output in a reply to this mail. This gives us an idea what TAS returns, fs type and flag-wise. - Build the latest Cygwin 1.5.25 from source http://cygwin.com/faq/faq-nochunks.html#faq.programming.building-cygwin and right in front of the comment starting in line 1713 in fhandler_disk_file.cc add if (!NT_SUCCESS (status)) debug_printf ("NtQueryDirectoryFile failed, status %p, win32 error %lu", status, RtlNtStatusToDosError (status)); Add the same lines preceeding the closing brace in line 1728. Then replace the cygwin1.dll with your own built cygwin1.dll and rerun strace like in your mail. The idea is to get the exact status codes. Both of the above actions allow us to find a workaround which might find its way into the upcoming Cygwin release 1.7. However, if TAS is is behaving like really old versions of Samba, I can't promise we will support it. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/