Files
freebsd/include
Jitendra Bhati e03ed9daeb fts: refactor to use fd-relative operations internally
Replace all _open() calls with _openat() in __fts_open(), fts_read(),
and fts_children().

Add fts_dirfd to FTSENT. Callers can use
openat(ent->fts_dirfd, ent->fts_name, ...) to access files
safely without relying on fts_accpath, which enables:

1. Capsicum capability mode where path-based operations fail
2. Security-sensitive programs that avoid TOCTOU races

Replace statfs(ent->fts_path) with _fstatfs(ent->fts_dirfd) in
fts_ufslinks() when fts_dirfd is valid, falling back to statfs() for
root-level entries where fts_dirfd is -1

This is a preparatory change for fts_openat() which will allow
callers to provide a pre-opened directory fd, enabling fts(3)
traversal inside Capsicum capability mode.

Sponsored by:	Google LLC (GSoC 2026)
Reviewed by:	asomers, jillest
MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2278
2026-06-23 08:53:56 -06:00
..
…
2026-02-02 21:20:16 +00:00
2023-11-26 22:23:28 -07:00
2023-11-26 22:23:28 -07:00
2023-11-26 22:23:28 -07:00
…
…
2023-11-26 22:23:28 -07:00
2023-11-26 22:23:28 -07:00
2025-09-11 17:12:22 +02:00
…
2023-11-26 22:23:28 -07:00
…
2023-11-26 22:23:28 -07:00
2023-11-26 22:23:28 -07:00
…
2023-11-26 22:23:28 -07:00
2026-06-22 15:23:48 +02:00
…
…
2025-06-11 17:16:20 -06:00
…
2023-11-26 22:23:28 -07:00
2024-10-14 10:26:17 -07:00
…
2023-11-26 22:23:28 -07:00
2023-11-26 22:23:28 -07:00
2023-11-26 22:23:28 -07:00
2023-11-26 22:23:28 -07:00
2023-11-26 22:23:28 -07:00
…
2024-08-26 18:27:29 +02:00
2026-05-27 00:05:45 +01:00
…
2026-01-19 18:49:57 +02:00
2024-04-23 19:51:22 +03:00
2023-11-26 22:23:28 -07:00
2023-11-26 22:23:28 -07:00
2023-11-26 22:23:28 -07:00
2025-10-04 10:50:02 +02:00
2023-11-26 22:23:28 -07:00
2023-11-26 22:23:28 -07:00
2025-06-11 17:16:22 -06:00
2023-11-26 22:23:28 -07:00
2026-01-06 20:26:59 -05:00
2026-03-06 01:46:53 +02:00
2023-11-26 22:23:28 -07:00
2023-11-26 22:23:28 -07:00
…
2023-11-26 22:23:28 -07:00
…
2023-11-26 22:23:28 -07:00
2025-11-28 16:19:53 +01:00
…
2026-05-10 17:53:20 +03:00
2023-11-26 22:23:28 -07:00
…
…
…
…
…