[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: -x test always succeeds for root on Solaris
From: |
Chet Ramey |
Subject: |
Re: -x test always succeeds for root on Solaris |
Date: |
Wed, 5 Jan 2011 16:53:47 -0500 |
> Machine Type: i386-pc-solaris2.11
>
> Bash Version: 4.1
> Patch Level: 9
> Release Status: release
>
> Description:
> On Solaris 11, when root (as after 'su -' or from cron) uses bash's built-in
> test to test for executability, it always succeeds, even when the file is
> not executable. This is because sh_eaccess() ends up calling access(2),
> which is basically documented to have this behavior.
Geez, I hate access. What a fundamentally flawed design. And yet
implementors keep stuffing more and more functionality into it (e.g.,
ACLs), requiring its use, though you can only trust it when it fails.
Even faccessat is no help.
Saying "yeah, there are a lot of bad access(2) implementations out there"
might be true, but doesn't help me very much.
This has been discussed extensively several times, most recently in
July, 2010.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/