delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/04/14/10:39:22

X-Spam-Check-By: sourceware.org
Date: Fri, 14 Apr 2006 16:39:05 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Spam:Re: Find not working w/ Samba drive
Message-ID: <20060414143905.GO9135@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <443BA3CA DOT 6070208 AT byu DOT net> <2919 DOT 71 DOT 113 DOT 94 DOT 37 DOT 1144784474 DOT squirrel AT wm0> <443C0749 DOT 6000106 AT maplesoft DOT com> <20060412094839 DOT GA10758 AT calimero DOT vinschen DOT de> <20060412153937 DOT GF9135 AT calimero DOT vinschen DOT de> <e1m3ku$32d$1 AT sea DOT gmane DOT org> <20060414090836 DOT GM9135 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
In-Reply-To: <20060414090836.GM9135@calimero.vinschen.de>
User-Agent: Mutt/1.4.2i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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 Apr 14 11:08, Corinna Vinschen wrote:
> On Apr 13 11:01, Shankar Unni wrote:
> > Corinna Vinschen wrote:
> > 
> > >Btw., I have hacked together a tiny testcase which lists a directory and
> > >evaluates the inode numbers using readdir and lstat.  I would be
> > >interested to see the output for some smaller directories on shares
> > >using pre-3.0 Samba versions. 
> > 
> > This is the output from a server running
> > 
> >    "Version Samba for GuardianOS v2.6.050.200310180953"
> > 
> > (this is a Snap Appliance file server, which seems to be a 2.4.19 linux 
> > kernel. Not sure if they've tweaked smbd in any way..):
> > 
> > % ./st //hq-share1
> >                Documents d: 000000000000000000, st: 018014724927011328
> >                   Backup d: 000000000000000000, st: 1495201458608421376
> >                   Builds d: 000000000000000000, st: 1297557616381147648
> >                        . d: 000000000000000000, st: 3313024975094127606
> >                       .. d: 000000000000000000, st: 000000000006035200
> > 
> > % % ./st //hq-share1/Backup   (names obfuscated..)
> >                        . d: 000000000000000000, st: 1495201458608421376
> >                       .. d: 000000000000000000, st: 3313024975094127606
> >                    xxxx1 d: 000000000000000000, st: 1531250493513284096
> 
> Sorry, no, that's impossible.  If the file system returns 0 for d_ino,
> or the file system is treated as unreliable, the Cygwin snapshots will
> always fake a non-0 inode number in d_ino.  It looks like you're using
> a non-matching 'struct dirent' definition.  Did you build the executable
> using the dirent.h file from the snapshot?

Anyway, I've finally set up my own stone age old Samba server (version
number 2.2.0) to test this behaviour.

I think I found a pretty simple solution.  It seems that we can differ
between just three types of remote file systems:

- File systems with the FILE_PERSISTENT_ACLS flag not set, for instance
  FAT, FAT32, etc.  Inode number?  Huh!  Here we must fake anyway.

- File systems with the FILE_PERSISTENT_ACLS set, but the returned
  inode numbers are <= UINT32_MAX, for instance NT4 NTFS, Samba < 3.0,
  resp. all remote file systems when running under NT4.  The inode numbers
  returned by these configurations seem to change between calls, so they
  are unreliable and have to be replaced by fake inode numbers.

- File systems with the FILE_PERSISTENT_ACLS set, returning inode numbers
  > UINT32_MAX.  These are the reliable ones, until further notice.

I've applied a patch to Cygwin which handles the remote file systems 
according to the above list now.  Please test the next developers
snapshot from http://cygwin.com/snapshots/


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