Documentation
¶
Index ¶
- Variables
- func APIError(err error) error
- func BytesToCString(data []byte) string
- func EnsureNod(path string, mode uint32, dev uint64) error
- func InitJail(c *JailConfig) error
- func NewShellJail(c *JailConfig, u *iam.User, token, pathVar, command string) (*exec.Cmd, error)
- func SSHSignalToOS(s ssh.Signal) os.Signal
- func SSHToPTYSize(s ssh.Window) *pty.Winsize
- type JailConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var TemplateFuncs = template.FuncMap{ "bytesToCString": BytesToCString, "toBytes": func(s string) []byte { return []byte(s) }, }
Functions ¶
func BytesToCString ¶ added in v0.1.5
func NewShellJail ¶
NewShellJail creates a new exec.Cmd for running fish in an nsjail
func SSHSignalToOS ¶
SSHSignalToOS converts an SSH signal to an os.Signal
Types ¶
type JailConfig ¶
type JailConfig struct {
TmpDir string `mapstructure:"tmp_dir"`
LogLevel string `mapstructure:"log_level"`
UIDStart uint32 `mapstructure:"uid_start"`
GIDStart uint32 `mapstructure:"gid_start"`
Cgroups struct {
Name string
Memory uint64
PIDs uint64
CPUTime uint32 `mapstructure:"cpu_time"`
} `mapstructure:"cgroups"`
HomeSize uint64 `mapstructure:"home_size"`
Greeting string
CLIExtra map[string]interface{} `mapstructure:"cli_extra"`
Network struct {
Interface string
Address net.IPNet
}
}
JailConfig represents jail configuration
Click to show internal directories.
Click to hide internal directories.