Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
neild opened this issue Mar 27, 2025 · 0 comments
Open

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

neild opened this issue Mar 27, 2025 · 0 comments
Labels
LibraryProposal Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool NeedsFix The path to resolution is known, but the work has not been done. OS-Darwin Performance

Comments

@neild
Copy link
Contributor

neild commented Mar 27, 2025

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.

@gabyhelp gabyhelp added the LibraryProposal Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool label Mar 27, 2025
@dmitshur dmitshur added Performance OS-Darwin NeedsFix The path to resolution is known, but the work has not been done. labels Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LibraryProposal Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool NeedsFix The path to resolution is known, but the work has not been done. OS-Darwin Performance
Projects
None yet
Development

No branches or pull requests

3 participants