Repository navigation
Conversation
steadytao
requested changes
Nov 3, 2026
Since 3.5.0 the receiver resolves its destination one component at a time with held directory fds. Without O_PATH these are opened O_RDONLY|O_DIRECTORY, so on macOS every ancestor of the destination must be readable, not just searchable. A destination below a mode 0711 home, or a sandbox that denies listing $HOME, fails with change_dir#1. Use O_SEARCH on macOS: from macOS 13 it needs only search permission, and older kernels ignore it, keeping the O_RDONLY|O_DIRECTORY behaviour. Not on illumos/Solaris, which checks search permission before O_DIRECTORY, so probing a regular file fails with EACCES rather than the ENOTDIR the resolvers expect. Run the search-only tests on macOS 13+ and FreeBSD. Their root runs there skip for lack of setpriv, so mark them fleet_nonroot and add targeted non-root steps to those CI jobs.
Author
|
I retitled this because it's now narrower in scope. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since 3.5.0 the receiver resolves its destination one component at a time with held directory fds. Without
O_PATHthese are openedO_RDONLY|O_DIRECTORY, so on macOS every ancestor of the destination must be readable, not just searchable. A destination below a mode 0711 home, or a sandbox that denies listing$HOME, fails withchange_dir#1.We use
rsyncin the Firefox build system, and some of our developers use thisrsyncversion, and not the built-in macOS version. Some developers sandbox their LLM agents with a little custom utility using Seatbelt/sandbox-exec, andrsyncfails because this utility blocks read access in paths above the Firefox source tree, only leaving the tree and some select directories (caches, etc.) read/write.This patch adds
O_SEARCH|O_DIRECTORYwhereO_PATHis unavailable.In terms of support, macOS 13+ and illumos check only search permission for it, so this fixes our use-case. Older macOS and NetBSD ignore it, so they keep the existing
O_RDONLY|O_DIRECTORYbehaviour.We can now run the search-only tests on macOS 13+ instead of Linux only. I also added a comment to explain why 2 tests are seemingly failing in my local runs.