Skip to content

os: os.Root: use O_NOFOLLOW_ANY on macOS #73079

Open
@neild

Description

@neild

macOS 11 and later's openat supports an O_NOFOLLOW_ANY flag which causes resolution to fail if any path component contains a symlink. We can use this to implement a fast-path for os.Root operations in the common case when the path does not contain a symlink.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolNeedsFixThe path to resolution is known, but the work has not been done.OS-DarwinPerformance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions