sudoers

package
v2.3.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const RegenerateGrantWarning = "" /* 190-byte string literal not displayed */

RegenerateGrantWarning applies even to network-only callers: they may be replacing a file that also contains block-device grants.

Variables

This section is empty.

Functions

func Args

func Args(user, group string, args ...string) []string

Args is the one place that defines Lima's non-interactive sudo invocation shape. Callers own the actual helper command names and sudoers policy; this package only keeps the invocation mechanics consistent.

func AssembleSudoersFragments

func AssembleSudoersFragments(fragments ...string) string

AssembleSudoersFragments joins already-rendered sudoers fragments into a single file. The individual fragments stay owned by their domain packages; this helper only handles the generic newline normalization needed to concatenate them.

func ContainsActiveFragment

func ContainsActiveFragment(file, fragment string) bool

func NOPASSWD

func NOPASSWD(subject, runAsUser, runAsGroup string, commands ...string) string

NOPASSWD renders a sudoers entry for one or more commands.

func NewCommand

func NewCommand(ctx context.Context, user, group string, stdin io.Reader, stdout, stderr io.Writer, dir string, args ...string) *exec.Cmd

func Run

func Run(ctx context.Context, user, group string, stdin io.Reader, stdout, stderr io.Writer, dir string, args ...string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL