bug-bash
[Top][All Lists]
Advanced

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

bash test builtin and test_eaccess() vs access()


From: Alan Sundell
Subject: bash test builtin and test_eaccess() vs access()
Date: Thu, 26 Jan 2006 17:16:56 -0800

bash's "test" builtin can report the wrong results in many
circumstances (e.g. read-only filesystems, noexec filesystems, ACLs,
NFS, AFS, setuid executables, etc) because it uses stat() rather than
access() for the unary -w, -r, -x, etc.

This has come up before:
http://lists.gnu.org/archive/html/bug-bash/2003-02/msg00028.html
http://www.cygwin.com/ml/cygwin-patches/2003-q1/msg00258.html

and it looks like the behavior of coreutils was fixed in the Feb 2003
4.5.8 release (with the patch in the link to the bug-bash post above).

However, the fix didn't seem to make its way into bash (at least as of
3.1).  So now bash's builtin test behaves differently from the test
binary from coreutils (or from Solaris and others, for that matter),
and it behaves wrongly to boot.

Could the eaccess/euidaccess code from coreutils be imported into bash
to resolve this?




reply via email to

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