Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com Date: Thu, 9 Jan 2003 12:58:27 +0100 From: Corinna Vinschen To: cygwin-developers AT cygwin DOT com Subject: Re: stat with no READ_CONTROL Message-ID: <20030109125827.J23921@cygbert.vinschen.de> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3.0.5.32.20030108231516.00838190@mail.attbi.com> User-Agent: Mutt/1.3.22.1i 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? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc.