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 Message-Id: <3.0.5.32.20030108231516.00838190@mail.attbi.com> X-Sender: phumblet AT mail DOT attbi DOT com Date: Wed, 08 Jan 2003 23:15:16 -0500 To: cygwin-developers AT cygwin DOT com From: "Pierre A. Humblet" <Pierre DOT Humblet AT ieee DOT org> Subject: stat with no READ_CONTROL Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Corinna, when stat is called on a file with a non-readable security descriptor (e.g. because of no READ_CONTROL permission), read_sd fails but stat still succeeds. However the uid and gid are set to garbage (uninitialized automatic variables) and the modes are from nontsec, rw-r--r--. Other info, such as the times and size, can be correct. The question is what to do about it. According to posix <http://www.opengroup.org/onlinepubs/007908799/xsh/fstat.html> stat can (additional or alternative file access control mechanisms) and must (cannot provide correct info) fail. 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? Pierre