bug-bash
[Top][All Lists]
Advanced

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

Re: Built-in "test -x" fails for root on FreeBSD


From: Chet Ramey
Subject: Re: Built-in "test -x" fails for root on FreeBSD
Date: Sat, 27 Mar 2010 13:32:59 -0400
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1

On 3/27/10 1:47 AM, Johan Hattne wrote:

> Bash Version: 4.1
> Patch Level: 2
> Release Status: release
> 
> Description:
>   The bash built-in test command fails to correctly report executable
>   status for non-executable files when run by root on FreeBSD.  On
>   FreeBSD, bash calls eaccess(2) to find the executable status, but
>   according to the man page "even if a process's real or effective user
>   has appropriate privileges and indicates success for X_OK, the file may
>   not actually have execute permission bits set". The attached patch is
>   based on source from FreeBSD's stand-alone test,
>   http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/test/test.c.

So now we can trust access/eaccess when they fail, but not when they report
success.  Why do designers keep stuffing things like ACL checks into
eaccess, requiring its use?  What a fundamentally flawed design.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

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