Skip to content
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

Use O_NOFOLLOW_ANY on macOS #179

Open
sunfishcode opened this issue Aug 20, 2021 · 0 comments
Open

Use O_NOFOLLOW_ANY on macOS #179

sunfishcode opened this issue Aug 20, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@sunfishcode
Copy link
Member

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.

@sunfishcode sunfishcode added the enhancement New feature or request label Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant