delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/07/28/12:08:57

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 28 Jul 2008 18:09:31 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: opendir/readdir failure on non-Samba Unix-hosted remote volumess
Message-ID: <20080728160931.GP29031@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <2870 DOT 139 DOT 153 DOT 254 DOT 191 DOT 1217245935 DOT squirrel AT www DOT cs DOT stir DOT ac DOT uk> <20080728123114 DOT GM29031 AT calimero DOT vinschen DOT de> <1358 DOT 139 DOT 153 DOT 254 DOT 191 DOT 1217259926 DOT squirrel AT www DOT cs DOT stir DOT ac DOT uk>
MIME-Version: 1.0
In-Reply-To: <1358.139.153.254.191.1217259926.squirrel@www.cs.stir.ac.uk>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019