Skip to content

Use F_KINFO on FreeBSD 13.1Β #331

@asomers

Description

@asomers

FreeBSD 13.1 introduced an F_KINFO fcntl command, which looks up a file descriptor's path. It's exactly what cap-primitives/rustix/fs/file_path needs. It's much more efficient than file_path_by_searching, and isn't vulnerable to the #330 bug. However, it can fail in certain circumstances, so file_path_by_searching should still be used as a fallback.

https://man.freebsd.org/cgi/man.cgi?query=fcntl&sektion=2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions