This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: opendir/readdir failure on non-Samba Unix-hosted remote volumess


On Jul 28 16:45, Sam Nelson wrote:
> On Mon, July 28, 2008 13:31, Corinna Vinschen wrote:
> > 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?
> 
> I mean from the `user experience' or `look&feel' angle.

Uh, ok.

> $ ./GetVolInfo /cygdrive/h
> Device Type        : 7
> Characteristics    : 10
> FileFsObjectIdInformation failed, c000000d
> Volume Name        : <?>
> Serial Number      : 0
> Max Filenamelength : 255
> Filesystemname     : <UNIXFS>
> Flags              : 400f
>   FILE_CASE_SENSITIVE_SEARCH  : TRUE
>   FILE_CASE_PRESERVED_NAMES   : TRUE
>   FILE_UNICODE_ON_DISK        : TRUE
>   FILE_PERSISTENT_ACLS        : TRUE
>   FILE_FILE_COMPRESSION       : FALSE
>   FILE_VOLUME_QUOTAS          : FALSE
>   FILE_SUPPORTS_SPARSE_FILES  : FALSE
>   FILE_SUPPORTS_REPARSE_POINTS: FALSE
>   FILE_SUPPORTS_REMOTE_STORAGE: FALSE
>   FILE_VOLUME_IS_COMPRESSED   : FALSE
>   FILE_SUPPORTS_OBJECT_IDS    : FALSE
>   FILE_SUPPORTS_ENCRYPTION    : FALSE
>   FILE_NAMED_STREAMS          : FALSE
>   FILE_READ_ONLY_VOLUME       : FALSE
>   FILE_SEQUENTIAL_WRITE_ONCE  : FALSE
>   FILE_SUPPORTS_TRANSACTIONS  : FALSE

Ok, the fs type is UNIXFS, so TAS won't be handled like Samba and it
won't get any workarounds we created for Samba.  Given that
FILE_PERSISTENT_ACLS is true, the FileIdBothDirectoryInformation info
class will be used by Cygwin.  That's probably where it goes downhill.
The actual status code would be interesting now.

> >   http://cygwin.com/faq/faq-nochunks.html#faq.programming.building-cygwin
> 
> I never tried that before.  I can give it a shot, I guess.

There are two easier solutions, maybe.  One is, try the latest Cygwin
DLL from http://www.cygwin.com/snapshots/ 
Just rename the currently installed DLL and drop in the snapshot DLL.
It will give you some warnings and maybe some paths won't be correct,
but it should at least allow to call ls /cygdrive/h.  The snapshot
DLL will print the exact status code when the NtQueryDirectoryFile
call fails.

Alternatively you could try to write a little application which opens a
directory handle on that drive and then calls NtQueryDirectoryFile along
the lines of Cygwin's fhandler_disk_file::readdir implementation, like
this:

  #include <windows.h>
  #include <ddk/ntddk.h> /* I think */

  HANDLE h = CreateFile ("H:", GENERIC_READ, ...);
  if (h != INVALID_HANDLE_VALUE)
    {
      status = NtQueryDirectoryFile (h, ..., FileIdBothDirectoryInformation, ...);
      if (!NT_SUCCESS (status)
	printf ("%p\n, status);
      status = NtQueryDirectoryFile (h, ..., FileDirectoryInformation, ...);
      if (!NT_SUCCESS (status)
	printf ("%p\n, status);
    }
  CloseHandle (h);

> Assuming the above GetVolInfo output doesn't answer the issue one way or
> the other, then, I guess I get back when I've done that.  I'm no fan of
> Samba, and I have MacOS to support with AFP from the same server, so I'm
> not about to throw TAS away.

That's your choice and I respect that.  But it's hard to support all
possible combinations of file systems with their kinks and bits.


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]