messenger: judge the break-glass file's owner by a faked owner both ways, so the test holds under root
mesh/merge-gate pass: builds messenger, sudo → ace, g14, novox, shanks; no bus step; every machine composes with the change as it did without (4 of 4 compo…
mesh/repo-check pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
mesh/delivery stopped: the pull request closed unmerged
mesh/merge-gate pass: builds messenger, sudo → ace, g14, novox, shanks; no bus step; every machine composes with the change as it did without (4 of 4 compo…
mesh/repo-check pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
mesh/delivery stopped: the pull request closed unmerged
The build seat runs the suite as root, where every file the test makes is root's, so "a file not made by root" was root's and unlinked (the forge's repo-check of 2026-10-09). The owner is now faked as another account for the refusal and as root for the act; the test fails as before under unshare -r without this.
This commit is contained in:
@@ -848,6 +848,12 @@ func TestBreakGlassIsAFileRootMadeAndTheMinuteGoesOn(t *testing.T) {
|
||||
t.Fatal("the router's minute hung on a break-glass file")
|
||||
}
|
||||
}
|
||||
// Who owns the file is what the kernel says, faked here both ways: the build seat runs this suite as root, where
|
||||
// every file the test makes is root's, and a person runs it as themselves (the forge's check of 2026-10-09 failed
|
||||
// on the first and passed on the second).
|
||||
was := fileOwner
|
||||
t.Cleanup(func() { fileOwner = was })
|
||||
fileOwner = func(os.FileInfo) uint32 { return 1000 }
|
||||
if err := os.WriteFile(filepath.Join(h.StateDir, "unlink.telegram"), nil, 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -859,8 +865,6 @@ func TestBreakGlassIsAFileRootMadeAndTheMinuteGoesOn(t *testing.T) {
|
||||
if _, err := h.Unlink("telegram"); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
was := fileOwner
|
||||
t.Cleanup(func() { fileOwner = was })
|
||||
fileOwner = func(os.FileInfo) uint32 { return 0 }
|
||||
_ = os.WriteFile(filepath.Join(h.StateDir, "unlink.telegram"), nil, 0o600)
|
||||
tick()
|
||||
|
||||
Reference in New Issue
Block a user