Skip to content

Use O_NOFOLLOW_ANY on macOS #179

@sunfishcode

Description

@sunfishcode

According to this blog post, macos 11 has a new O_NOFOLLOW_ANY flag that causes open to fail if any path component is a symlink. Assuming symlinks are relatively rare, cap-std could use this as a fast path -- check that the path contains no explicit .. and then open with O_NOFOLLOW_ANY; if that succeeds, then we're done. If either of those fails, open with the slow path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions