Documentation
¶
Overview ¶
Package sudo is policy-free plumbing for driving an interactive sudo over an ssh transport without either (a) carrying a password
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoTTY = errors.New("sudo: no controlling tty; cannot prompt for password")
ErrNoTTY is returned by ReadPassword when /dev/tty cannot be opened. CI and headless invocations should fail fast on this rather than hang
Functions ¶
func PasswordRequired ¶
PasswordRequired returns true when stderr from a `sudo -n` attempt indicates the failure was "password needed" rather than a genuine
func ReadPassword ¶
ReadPassword prompts on /dev/tty (NOT stdin, which the caller will reuse to pipe the password into the remote sudo) and returns the
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.