Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUntrustedSource = errors.New("privileged helper source is not trusted")
ErrUntrustedSource means the running binary is not safe to install as the privileged helper (it is not root-owned, or its path is writable).
Functions ¶
func Install ¶
Install writes the helper binary, its root-owned config, and the passwordless sudoers rule.
The rule authorizes a single fixed helper path. sudo-rs (the default sudo/su on Ubuntu 25.10+) forbids wildcards in command arguments, so the helper must resolve the container itself rather than receiving a PID and script from the caller. See internal/nshelper.
func IsInstalled ¶
IsInstalled reports whether the sudoers rule, helper, and helper config all exist. Requiring the config means an upgrade from the old shell-script helper counts as not installed and is replaced by start.
Types ¶
type Options ¶ added in v0.20.4
type Options struct {
User string
Machine string
UID int
GID int
Home string
Rootfs string
// AllowUntrustedSource is set only by the explicit, sudo-authenticated
// `init` command. `start` leaves it false so a user-owned binary cannot
// refresh the root-owned helper without an explicit install.
AllowUntrustedSource bool
}
Options are the values baked into the root-owned helper and its config.