[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [FYI] {master} maint: assume 'test -x' is portable

From: Eric Blake
Subject: Re: [FYI] {master} maint: assume 'test -x' is portable
Date: Thu, 23 Feb 2012 17:13:55 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1

On 02/23/2012 04:50 PM, Paul Eggert wrote:
> On 02/23/2012 03:05 PM, Stefano Lattarini wrote:
>> address@hidden -r}.  Do not use @samp{test -e} either, because Solaris 10
> The word "either" should be removed.  Otherwise looks OK.

I just thought of another issue worth documenting:

On systems where access(,X_OK) gives bogus results when run as root, it
is also possible for 'test -x' to give those same bogus results (that
is, POSIX allows but discourages test -x as root to always succeed,
where no one can actually execute the file).  Also, in the presence of
ACLs, it is unspecified whether test matches the ACLs or just the stat
mode bits (POSIX recommends matching the ACLs, but that in turn can be
surprising when a file mode 0600 owned by someone else passes 'test -r'
for the current user due to an ACL).

Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]