Repository navigation
Prevent log permission repair from changing symlink targets - #4611
Merged
Merged
Conversation
1 task
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.
Reject symlinked directories in the log tree before changing directory permissions. The permission helper added in #4604 used
set_permissionson each path, which follows a symlink: a linked log directory could change an unrelated directory to mode0700. Creating descendants one level at a time also avoids writing through a nested directory link before it is checked.The regression test covers a linked log root and a linked child directory. It failed before the fix and passes afterward.
cargo fmt --checkand the focused unit test pass. The fullcargo run -- hook pre-merge --yesgate ran 5,462 tests: 5,455 passed, seven failed, and one was skipped. The failures include Unix socket creation blocked by this sandbox, shell-install snapshot path differences, and an SSH signing key mode error; I have not confirmed whether they reproduce onmain.