Clear set-ID bits on Windows VM directories - #10046
0bsolescence wants to merge 1 commit into
Conversation
|
Reviewed at head cd26237. The production change is correct, and the test line you added is a real regression test rather than a restatement. Checked the mode arithmetic by running it rather than by reading the manual. On GNU coreutils 9.11, Tests ran on a disposable VM, not on the machine doing the review. Also ran the mode the open issues actually describe. dockur/windows' What it does not cover: Separately, the rejection at Second opinion from Codex (gpt-5.6-sol) at xhigh reasoning: no defect found. It agreed on the mode arithmetic, on lines 1018/1061/267 being defence-in-depth rather than launch blockers, and on which assertion breaks without the fix — but that agreement is with conclusions already written down in this session and its independence is not currently guaranteed, so it is worth less than the mutation runs above. It did add one thing that was not already checked: the Waiting on the maintainer. This is one of six open pull requests touching this line — #9564, #9605, #9783, #9989, #10113 and this one — and choosing between them is not triage's call. Worth knowing when you read the thread: #9564 changes the identical line to the identical symbolic mode. |
Fixes #9374.\n\nGNU chmod preserves set-ID bits on directories when applying a numeric mode, so a shared directory left at mode 2700 remained 2700 after chmod 0700. The following exact-mode check then rejected it and prevented the Windows VM from launching.\n\nUse an explicit symbolic mode that clears special bits while setting private 0700 permissions. Add a mount-boundary regression case starting with a setgid shared directory.\n\nTests:\n- bash test/shell.d/windows-vm-mount-boundary-test.sh (passes in an isolated privileged namespace)\n- ./test/all (Windows VM tests pass; five unrelated environment-dependent files fail because omarchy-pkgs is not checked out and the live desktop differs from test expectations)