Expand description
Resolve how the harness gains root to load the scheduler, and build the
privileged commands. Ported from the Python harness’s setup_sudo.
Precedence:
- already root -> run directly, no sudo
$SUDO_ASKPASSset ->sudo -A(use the caller’s askpass)$SCX_SUDO_PASSWORD_FILE-> generate an askpass shim that prints the file’s contents and usesudo -A; the password stays in the file and never appears in argv or the process table- otherwise ->
sudo -n(passwordless / cached credentials)
Structs§
- Sudo
- Resolved sudo strategy: the argv prefix plus any owned askpass shim.
- Temp
Shim 🔒 - A generated askpass shim, removed from disk when dropped (replaces atexit).
Functions§
- shell_
quote 🔒 - Single-quote a path for safe embedding in a /bin/sh script.