Files
freebsd/lib/libc
Jitendra Bhati 74bd6fb1eb fts: fix fts_accpath regression after fts_children()
When fts_children() is called, sp->fts_child is set. On the
next fts_read() call, fts_safe_changedir() was incorrectly
passed p->fts_dirfd (pointing to the parent directory) instead
of -1. This caused fts to fchdir to the parent instead of the
child directory, silently skipping the contents of 3rd-level
subdirectories. This was observed as a failure in
nmtree_test:mtree_create which calls fts_children() internally.

Add regression test accpath_correct_after_descent that calls
fts_children() on each directory entry and verifies files at
depth 3 are still visited correctly. The test fails with the
unfixed libc and passes with the fix.

Reported by:	Herbert J. Skuhra <[email protected]>
Sponsored by:	Google LLC (GSoC 2026)
Reviewed by:	asomers
Fixes:		4bd01d6ae0 ("fts: refactor to use fd-relative")
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2354
2026-08-06 16:51:25 -06:00
..
…
…
…
…
2026-06-29 13:20:02 -07:00
…
2026-05-14 12:34:40 +02:00
2026-06-21 17:48:49 +01:00
…
…