[bug #60207] -prune returns false for files for which fstatat() fails with EACCESS

Stephane Chazelas <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <[email protected]>
Follow-up Comment #1, bug #60207 (project findutils):

For the record, comparison with other find implementations on that second
(symlink-based) example on the same system:


$ gnu-find -L . -name 'a*' -prune -o -print
.
./b1
find: ‘./a1’: Permission denied
./a1
./b2
find: ‘./a5’: Not a directory
find: ‘./a4’: Too many levels of symbolic links
$ busybox find -L . -name 'a*' -prune -o -print
.
./b1
find: ./a1: Permission denied
./b2
find: ./a5: Not a directory
find: ./a4: Too many levels of symbolic links
$ sfind -L . -name 'a*' -prune -o -print
.
./b1
./b2
$ heirloom-find -L . -name 'a*' -prune -o -print
.
./b1
heirloom-find: cannot follow symbolic link ./a3: No such file or directory
heirloom-find: cannot follow symbolic link ./a1: Permission denied
./b2
heirloom-find: cannot follow symbolic link ./a5: Not a directory
heirloom-find: cannot follow symbolic link ./a4: Too many levels of symbolic
links


(heirloom-find being the one from the "heirloom toolchest" based on
OpenSolaris, and sfind being from schily-tools).

See also these differences wrt to which files are reported without -prune:


$ find -L . -name 'a*'
./a3
find: ‘./a1’: Permission denied
./a1
find: ‘./a5’: Not a directory
./a5
find: ‘./a4’: Too many levels of symbolic links
./a2
$ busybox find -L . -name 'a*'
./a3
find: ./a1: Permission denied
find: ./a5: Not a directory
find: ./a4: Too many levels of symbolic links
./a2
$ sfind -L . -name 'a*'
./a3
./a1
./a5
./a4
./a2
$ heirloom-find -L . -name 'a*'
heirloom-find: cannot follow symbolic link ./a3: No such file or directory
heirloom-find: cannot follow symbolic link ./a1: Permission denied
heirloom-find: cannot follow symbolic link ./a5: Not a directory
heirloom-find: cannot follow symbolic link ./a4: Too many levels of symbolic
links
./a2


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60207>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.