Documentation
¶
Overview ¶
Package helper runs external helpers with optional sandboxing.
Index ¶
Constants ¶
View Source
const ( // FortifyHelper is set to 1 when args fd is enabled and 0 otherwise. FortifyHelper = "FORTIFY_HELPER" // FortifyStatus is set to 1 when stat fd is enabled and 0 otherwise. FortifyStatus = "FORTIFY_STATUS" )
Variables ¶
View Source
var WaitDelay = 2 * time.Second
Functions ¶
func InternalHelperStub ¶ added in v0.3.0
func InternalHelperStub()
InternalHelperStub is an internal function but exported because it is cross-package; it is part of the implementation of the helper stub.
func MustNewCheckedArgs ¶
MustNewCheckedArgs returns a checked null-terminated argument writer for a copy of args. If s contains a NUL byte this function panics instead of returning an error.
Types ¶
type Helper ¶
type Helper interface { // Start starts the helper process. Start() error // Wait blocks until Helper exits. Wait() error fmt.Stringer }
func New ¶
func New( ctx context.Context, name string, wt io.WriterTo, stat bool, argF func(argsFd, statFd int) []string, cmdF func(container *sandbox.Container), extraFiles []*os.File, ) Helper
New initialises a Helper instance with wt as the null-terminated argument writer.
func NewDirect ¶ added in v0.3.0
func NewDirect( ctx context.Context, name string, wt io.WriterTo, stat bool, argF func(argsFd, statFd int) []string, cmdF func(cmd *exec.Cmd), extraFiles []*os.File, ) Helper
NewDirect initialises a new direct Helper instance with wt as the null-terminated argument writer. Function argF returns an array of arguments passed directly to the child process.
Click to show internal directories.
Click to hide internal directories.