Skip to content

Prevent log permission repair from changing symlink targets - #4611

Merged
max-sixty merged 1 commit into
mainfrom
nightly/clean-40462497828-log-directory-symlink
Oct 27, 2026
Merged

max-sixty merged 1 commit into
mainfrom
nightly/clean-40462497828-log-directory-symlink

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Reject symlinked directories in the log tree before changing directory permissions. The permission helper added in #4604 used set_permissions on each path, which follows a symlink: a linked log directory could change an unrelated directory to mode 0700. 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 --check and the focused unit test pass. The full cargo run -- hook pre-merge --yes gate 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 on main.

@worktrunk-bot worktrunk-bot added the nightly-cleanup Issues found by nightly code quality sweep label Oct 27, 2026
@max-sixty
max-sixty merged commit 793237d into main Oct 27, 2026
37 of 47 checks passed
@max-sixty
max-sixty deleted the nightly/clean-40462497828-log-directory-symlink branch October 27, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nightly-cleanup Issues found by nightly code quality sweep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants