Read first
docs/architecture/authority: which capabilities exist, who holds them, how they passdocs/architecture/privd: how privd identifies, judges, asks and runs a requestdocs/abi/privd-actions: every action, the policy grammar, refusals, limits, wire framesdocs/abi/interfaces: the consent channel and privd frames across a base switch
Rules a change must keep
- Every check reads the task's capability mask. A check on
task.flags, a
path, a task id or a uid where a capability fits is a second authority.
- A spawn delegates only a subset of the spawner's mask; nothing about a
program's path, owner or mode adds a capability.
execkeeps only the universal capabilities. The one exception is init
re-executing /sbin/init (exec_keeps_authority); to hand a mask on, spawn
through slopos_userland::held.
- uid 0 alone is no principal.
rootis uid 0 running an attested base program. - privd reads the requester from the socket's recorded identity, again before
the verdict, after the question and before the start. Never look it up by
pid or path.
- Every failure in privd is a refusal: a failed lookup, a bad frame, a
requester that exited or changed program.
- A mechanism inherits nothing but the listed environment, directory and
three descriptors, and acts only for the action PRIV_ACTION names.
describe,detail,verband every refusal sentence pass
slopos_priv_core::words; a change to what a question may carry bumps
consent::VERSION.
REQUESTER_CEILING,DELEGABLEandPRIVD_CAPSare stated once in
priv-core/src/lib.rs; a new capability needs a decision for each.
- A new privileged job is a new action with the narrowest shapes and
capabilities, whose program calls elevate.
- A utest runs as uid 0 with every capability unless it declares
caps = …, uid = …; a refusal test must declare them.
Checks
just test-host: priv-core's policy, words, consent and wire testsjust test 'slopos_core::utests::utest_privd': privd end to end,endtaskjust test 'slopos_core::utests::utest_priv':priv, its ceiling, kept answersjust test 'slopos_core::utests::utest_peer': the peer socket optionsjust test 'slopos_core::utests::utest_spawn_privilege*': delegation between real processesjust check-framekernel-gates: includes theauthorityELF reachability gate
Not yet in the docs
Read pending.md beside this file when it exists. A change that adds or alters an invariant the docs do not state appends it there in the same commit.