Skip to content

Safe traversal module only enabled on Linux #9747

Description

@sylvestre

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions