Documentation
¶
Index ¶
- func FakerootExecHandler(killTimeout time.Duration) interp.ExecHandlerFunc
- func InsufficientArgsError(cmd string, exp, got int) error
- func NopExec(context.Context, []string) error
- func NopOpen(context.Context, string, int, os.FileMode) (io.ReadWriteCloser, error)
- func NopReadDir(context.Context, string) ([]fs.DirEntry, error)
- func NopStat(context.Context, string, bool) (os.FileInfo, error)
- func RestrictedExec(allowedCmds ...string) interp.ExecHandlerFunc
- func RestrictedOpen(allowedPrefixes ...string) interp.OpenHandlerFunc
- func RestrictedReadDir(allowedPrefixes ...string) interp.ReadDirHandlerFunc2
- func RestrictedStat(allowedPrefixes ...string) interp.StatHandlerFunc
- type ExecFunc
- type ExecFuncs
- type NopRWC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FakerootExecHandler ¶
func FakerootExecHandler(killTimeout time.Duration) interp.ExecHandlerFunc
FakerootExecHandler was extracted from github.com/mvdan/sh/interp/handler.go and modified to run commands in a fakeroot environent.
func InsufficientArgsError ¶
func RestrictedExec ¶
func RestrictedExec(allowedCmds ...string) interp.ExecHandlerFunc
func RestrictedOpen ¶
func RestrictedOpen(allowedPrefixes ...string) interp.OpenHandlerFunc
func RestrictedReadDir ¶
func RestrictedReadDir(allowedPrefixes ...string) interp.ReadDirHandlerFunc2
func RestrictedStat ¶
func RestrictedStat(allowedPrefixes ...string) interp.StatHandlerFunc
Types ¶
type ExecFuncs ¶
func (ExecFuncs) ExecHandler ¶
func (ef ExecFuncs) ExecHandler(fallback interp.ExecHandlerFunc) interp.ExecHandlerFunc
ExecHandler returns a new ExecHandlerFunc that falls back to fallback if the command cannot be found in the map. If fallback is nil, the default handler is used.
Click to show internal directories.
Click to hide internal directories.