| new file mode 100644 |
| index 000000000..8bf02b069 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-named-units-guard-fix.tsv |
| @@ -0,0 +1,13 @@ |
| +# Census overlay named-units-guard-fix, written by census-propose (#369). census-ruling-named-units-guard-fix, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-named-units-guard-fix.md. |
| +# 2 body, 0 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 2 new dispositions: 0 reads re-frozen at their disposition with the claim, 2 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| +@legacy 460768a56c895733c6e75efa36f0f9c80d8edd8cd7eea6a79cd99560312e44f0 internal/host/unitops.go RunSystemNamedUnitsInstall legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-units-param-114;basis=new (Task 7, renamed from RunSystemNamedUnits): carlos system named-units install <file>: refuses unless euid 0, reads the operator-given <file> by root's own choice at the command line and hands it to InstallNamedUnits, which now also runs both decoders and the console guard rule under the lock;rev3=census-ruling-named-units-guard-fix;basis=InstallNamedUnits now also returns the unguarded reason; the verb prints it beside the installed path. No new read file:ReadFile@278 03ab2984b8866a2a590a9867cf8b04fd1af853e1286b654c5f992ac46afa1c10 |
| +@legacy 52bd09a6e1493f6816db6ca3ff4875fa7912f0f853df4253b0ae95daf70d19c6 internal/host/unitops.go consoleGuardHost legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-units-param-114;basis=new (Task 2/4): root's trusted read (rootstate.OpenTrustedFile, MaxRecord cap) of <opt>/system/guard/console-ready.json, the marker root's guard-arm writes; absent is unguarded, any other failure or a marker naming no valid live host is an error that refuses the install; the host is taken only when the bytes equal release.LiveLink(opt, host);rev3=census-ruling-named-units-guard-fix;basis=the guard read now distinguishes an untrusted chain, which is treated as unguarded (Paul's ruling 2026-11-19): it walks <opt>/system/guard first with rootstate.OpenTrustedDir (same root-trusted walk as before); os.ErrPermission from that walk is ok=false, no error, with an unguarded reason; absent is ok=false as before; then it opens console-ready.json in the walked directory with rootstate.OpenTrustedFileIn (same file checks as OpenTrustedFile: no symlink, root-owned, one link, not group/other-writable) and an untrusted, oversized or hostless marker still refuses. No new read: the same marker through the same checks, split in two file:ReadAll@623 e7372aa14ec47f8b6deb88f20c8a8d15cccab06c7d6b0db7589ac85b6dfc23e6 |
| +@legacy fd0ef2ab251290b608f54ff6b03a2f6df56d638b43b7da33aeb13185815bd006 internal/rootstate/file_linux.go OpenTrustedDir legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-units-guard-fix;basis=new: OpenTrustedFile's directory walk on its own (Open(path, false, true), every directory from / root-owned, not group/other-writable, r-x for both), returning the directory's descriptor; reads nothing new file:Open@64 de0f8222d4721aa93a5588b7cdb9953700c970a9c467d74ad6bc0fb72b378d33 |
| +@legacy e3755aca1755d5cd80b474d720c4c7ea73f0bc12890220d75219f65ed516f58a internal/rootstate/file_linux.go OpenTrustedFileIn legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-units-guard-fix;basis=new: OpenTrustedFile's file half: opens one name in a descriptor OpenTrustedDir or OpenTrustedDirFrom returned, through safefile.OpenFileAt (O_NOFOLLOW, regular, one link) and trusted() against the directory's owner (root for OpenTrustedDir); reads nothing new file:Fstat@101 988166d41e2f4702db8df21a2c56dad5b8d7fd0e34dc9ee0a76f5a501a22a842 |
| +internal/host/unitops.go RunSystemNamedUnitsInstall legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-units-param-114;basis=new (Task 7, renamed from RunSystemNamedUnits): carlos system named-units install <file>: refuses unless euid 0, reads the operator-given <file> by root's own choice at the command line and hands it to InstallNamedUnits, which now also runs both decoders and the console guard rule under the lock;rev3=census-ruling-named-units-guard-fix;basis=InstallNamedUnits now also returns the unguarded reason; the verb prints it beside the installed path. No new read file:ReadFile@278 03ab2984b8866a2a590a9867cf8b04fd1af853e1286b654c5f992ac46afa1c10 |
| +internal/host/unitops.go consoleGuardHost legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-units-param-114;basis=new (Task 2/4): root's trusted read (rootstate.OpenTrustedFile, MaxRecord cap) of <opt>/system/guard/console-ready.json, the marker root's guard-arm writes; absent is unguarded, any other failure or a marker naming no valid live host is an error that refuses the install; the host is taken only when the bytes equal release.LiveLink(opt, host);rev3=census-ruling-named-units-guard-fix;basis=the guard read now distinguishes an untrusted chain, which is treated as unguarded (Paul's ruling 2026-11-19): it walks <opt>/system/guard first with rootstate.OpenTrustedDir (same root-trusted walk as before); os.ErrPermission from that walk is ok=false, no error, with an unguarded reason; absent is ok=false as before; then it opens console-ready.json in the walked directory with rootstate.OpenTrustedFileIn (same file checks as OpenTrustedFile: no symlink, root-owned, one link, not group/other-writable) and an untrusted, oversized or hostless marker still refuses. No new read: the same marker through the same checks, split in two file:ReadAll@623 e7372aa14ec47f8b6deb88f20c8a8d15cccab06c7d6b0db7589ac85b6dfc23e6 |
| +internal/rootstate/file_linux.go OpenTrustedDir legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-units-guard-fix;basis=new: OpenTrustedFile's directory walk on its own (Open(path, false, true), every directory from / root-owned, not group/other-writable, r-x for both), returning the directory's descriptor; reads nothing new file:Open@64 de0f8222d4721aa93a5588b7cdb9953700c970a9c467d74ad6bc0fb72b378d33 |
| +internal/rootstate/file_linux.go OpenTrustedFileIn legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-units-guard-fix;basis=new: OpenTrustedFile's file half: opens one name in a descriptor OpenTrustedDir or OpenTrustedDirFrom returned, through safefile.OpenFileAt (O_NOFOLLOW, regular, one link) and trusted() against the directory's owner (root for OpenTrustedDir); reads nothing new file:Fstat@101 988166d41e2f4702db8df21a2c56dad5b8d7fd0e34dc9ee0a76f5a501a22a842 |
| +@coverage internal/host 00220429cf36f35b91261358f6748fe08aeae19defa5562f93ef749bb10ec53a |
| +@coverage internal/rootstate fa81cd055bfc3b6f0c19075b65ada2e0798cf14ca6ecb4ff8657159e915fd6d4 |