LeonOS Documentation

2026-09-11 — privilege elevation (sudo / su / Fileman prompt)

Follow-up security repair

The original safety claims below were invalidated by a follow-up review: the production password checker returned boolean success while its sudo adapter expected zero, accepting wrong passwords; ordinary-account password verification also polluted the administrator cache. Both now have production regressions and fixes. Additional repairs isolate service descriptors, private connections, command slots, stdio/cwd and privileged file-operation results. See docs/SUDO_AND_ELEVATION.md's repair section for the current trust boundary, protocol migration, evidence and remaining limitations. Earlier "no guest run" text describes the original submission, not subsequent validation.

Scope of the change

Added a privileged broker in authd plus sudo, su, a fixed-path worker (sudod) and a Fileman elevation prompt. The kernel, the public ABI headers and the SDK are unchanged: the mechanism relies entirely on the fact that authd already runs as uid 0 and that only uid 0 may assume another identity.

Trust boundary

Unchanged in kind, extended in surface: every privileged request is served by an authd_sudo_*_from_peer handler, and the caller's identity is the SO_PEERCRED uid recorded when the connection was accepted. Request payloads carry what to do, never who is asking. tools/test_security_regressions.py --strict asserts this dispatch shape in addition to the existing kernel uid==0 gates.

What is defended

What is NOT defended

Unchanged non-goals

File setuid/setgid execution remains unimplemented, and this change does not alter that: docs/POSIX_PERMISSIONS_2026-09-08.md stays accurate as written.