Files
freebsd/lib
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-01-13 10:19:04 -05:00
2026-01-03 21:37:18 +01:00
2026-08-04 11:55:22 +02:00
2026-01-06 12:56:50 -05:00
2026-03-31 18:45:14 -07:00
2026-06-02 21:54:25 -07:00
2026-03-15 00:41:29 -03:00
2025-11-24 10:47:10 -05:00
2026-08-04 18:27:21 +00:00
…
2026-01-06 04:26:53 +00:00
2026-03-13 23:49:53 +00:00
2026-04-08 14:22:45 -07:00
2026-08-02 13:17:45 +02:00
2026-01-15 07:28:28 +01:00
2025-12-03 14:21:07 +00:00
2026-07-07 08:47:36 +02:00