pub async fn run_privileged(
op: PrivilegedOp,
running_as_root: bool,
) -> Result<(), Error>Expand description
Execute a privileged operation asynchronously.
Forwards to a blocking thread (the underlying duct calls are blocking).
ยงErrors
Propagates any Error from the underlying file operations or commands,
including a Error::SshdConfigInvalid when sshd -t rejects the new
config, Error::SshdNotFound when the sshd binary is genuinely
unavailable (the write fails closed in that case), or Error::SudoFailed
when sudo -n lacks cached credentials.