Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[[ -x file ]]



The ChangeLog for 3.1.2-test1:
#	* Src/cond.c: [[ -x file ]] does stat for privileged users

I think this is a bad idea.  access(, X_OK) is the right way to test for
executability.  The new test gets it wrong over NFS with root squash,
and on directories with no execute bits set (which *are* executable to
the super-user).  Furthermore, with POSIX.1e capabilities, it is one
specific capability (well, two, CAP_DAC_READ_SEARCH for directories and
CAP_DAC_EXECUTE for files) that overrides normal DAC, whereas the new
code tests for *any* capability being set.

What was the reason for this change?

-zefram



Messages sorted by: Reverse Date, Date, Thread, Author