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

Open directories using O_SEARCH #228

Merged
merged 1 commit into from
Dec 5, 2024
Merged

Conversation

EdSchouten
Copy link
Member

Right now we open directories using O_RDONLY. This is problematic, because it means we can't perform operations on directories that only have execute permissions. The solution for this is to use O_SEARCH, which was added in POSIX 2008.

Linux doesn't offer O_SEARCH, but we can emulate it using O_PATH. macOS has supported this feature since Ventura (October 2022).

@EdSchouten EdSchouten force-pushed the eschouten/20241205-o-search branch from b19cbb3 to b263fc6 Compare December 5, 2024 13:41
Right now we open directories using O_RDONLY. This is problematic,
because it means we can't perform operations on directories that only
have execute permissions. The solution for this is to use O_SEARCH,
which was added in POSIX 2008.

Linux doesn't offer O_SEARCH, but we can emulate it using O_PATH. macOS
has supported this feature since Ventura (October 2022).
@EdSchouten EdSchouten force-pushed the eschouten/20241205-o-search branch from b263fc6 to 4b75252 Compare December 5, 2024 14:45
@EdSchouten EdSchouten merged commit a041f42 into master Dec 5, 2024
1 check passed
@EdSchouten EdSchouten deleted the eschouten/20241205-o-search branch December 5, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant