Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DenyInit ¶ added in v0.9.3
func DenyInit(args []string)
DenyInit is called early in main when the binary is re-exec'd as a sandbox deny-path wrapper. It mounts empty read-only tmpfs over each denied path (hiding its contents), then execs the real command. This runs inside a user+mount namespace where we have CAP_SYS_ADMIN.
Types ¶
type Config ¶
type Config struct {
Isolation Level
Mounts []Mount
Deny []string // paths to mask (e.g. ~/.ssh)
AllowOutbound bool // allow outbound network even if isolation denies it
Timeout time.Duration
CPULimit time.Duration // RLIMIT_CPU (0 = backend default)
MemLimit uint64 // RLIMIT_AS in bytes (0 = backend default)
MaxFDs uint32 // RLIMIT_NOFILE (0 = backend default)
}
Config holds sandbox creation parameters.
type EnforcementError ¶ added in v0.8.4
EnforcementError is returned when the system cannot enforce the requested sandbox config.
func (*EnforcementError) Error ¶ added in v0.8.4
func (e *EnforcementError) Error() string
Click to show internal directories.
Click to hide internal directories.