Component
chmod / du
Description
uutils has a safe_traversal module that uses fd-relative syscalls, however, it's gated with #[cfg(target_os = "linux")] even though the underlying syscalls are POSIX.1-2008 and are available on macOS/BSDs via the nix crate.
Since the syscalls used (openat, fstatat, fchmodat, fchownat, unlinkat) are not Linux-specific, this appears to be an overly conservative gating choice.
Impact
Non-Linux platforms don't benefit from the fd-relative traversal that reduces TOCTOU surface.
Component
chmod/duDescription
uutils has a
safe_traversalmodule that uses fd-relative syscalls, however, it's gated with#[cfg(target_os = "linux")]even though the underlying syscalls are POSIX.1-2008 and are available on macOS/BSDs via thenixcrate.Since the syscalls used (
openat,fstatat,fchmodat,fchownat,unlinkat) are not Linux-specific, this appears to be an overly conservative gating choice.Impact
Non-Linux platforms don't benefit from the fd-relative traversal that reduces TOCTOU surface.