www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2003/01/09/11:32:38

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Date: Thu, 9 Jan 2003 11:33:07 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin-developers AT cygwin DOT com
Subject: Re: stat with no READ_CONTROL
Message-ID: <20030109163307.GA11349@redhat.com>
Reply-To: cygwin-developers AT cygwin DOT com
Mail-Followup-To: cygwin-developers AT cygwin DOT com
References: <3 DOT 0 DOT 5 DOT 32 DOT 20030108231516 DOT 00838190 AT mail DOT attbi DOT com> <20030109125827 DOT J23921 AT cygbert DOT vinschen DOT de>
Mime-Version: 1.0
In-Reply-To: <20030109125827.J23921@cygbert.vinschen.de>
User-Agent: Mutt/1.5.1i

On Thu, Jan 09, 2003 at 12:58:27PM +0100, Corinna Vinschen wrote:
>On Wed, Jan 08, 2003 at 11:15:16PM -0500, Pierre A. Humblet wrote:
>> A consequence of this hard nosed approach is that ls -l may not show 
>> all files. To avoid that, stat could return uid = gid = -1 and modes = 0.
>> 
>> Which is best in this case: conformance to posix or user friendliness?
>
>IMHO user friendliness.  I've checked in a patch.  When calling ls -l
>on such a file or dir, the output looks like this now:
>
>  ----------    1 65535    65535       48452 Jan  7 12:17 foo
>  d---------    2 65535    65535           0 Jan  9 12:09 foodir
>
>
>However, coincidentally I found another problem while testing that change.
>When a directory is unreadable for an account, the link count of that
>directory is set to 0 by the call to num_entries(). 
>
>That should be 2, shouldn't it?
>
>There's the comment in fhandler_disk_file::fstat_helper() which is
>fairly old AFAIR:
>
>  /* Unfortunately the count of 2 confuses `find (1)' command. So
>     let's try it with `1' as link count. */
>
>But this is only valid for remote dirs so it should be safe to return 2
>from num_entries.
>
>Chris?

Isn't that your comment, Corinna?

If you want to set it to 2, that's fine with me.

cgf

- Raw text -


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