[Bug 287451] [/bin/ls] readdir() errors delivered via fts_children() are silently discarded
Date: Wed, 11 Feb 2026 19:57:22 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=287451
--- Comment #1 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:
URL:
https://cgit.FreeBSD.org/src/commit/?id=7bf81e39d83087dc7f984077b5eed5a48df794d4
commit 7bf81e39d83087dc7f984077b5eed5a48df794d4
Author: Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2026-02-11 19:55:55 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2026-02-11 19:56:37 +0000
ls: check fts_children() for errors that may not surface otherwise
In particular, if one simply does a non-recursive `ls` on a directory
that is not accessible, there are some classes of errors that may cause
it to fail that wouldn't be surfaced unless we do an fts_read() that
will recurse into the inaccessible directory. Catch those kinds of
errors here since we cannot expect to an FTS_ERR/FTS_DNR entry to follow
up on them.
PR: 287451
Reviewed by: kib
Discusssed with: des
Differential Revision: https://reviews.freebsd.org/D51056
bin/ls/ls.c | 17 +++++++++++++++++
bin/ls/tests/ls_tests.sh | 30 ++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+)
--
You are receiving this mail because:
You are on the CC list for the bug.