config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const NsjailConfigPath = "/tmp/nsjail.cfg"

Variables

This section is empty.

Functions

func MountDev

func MountDev(devs []string) error

func RunHook

func RunHook() error

func WriteConfig

func WriteConfig(msg *nsjail.NsJailConfig) error

Types

type Config

type Config struct {
	Time       uint32   `env:"JAIL_TIME" envDefault:"20"`
	Conns      uint32   `env:"JAIL_CONNS"`
	ConnsPerIp uint32   `env:"JAIL_CONNS_PER_IP"`
	Pids       uint64   `env:"JAIL_PIDS" envDefault:"5"`
	Mem        size     `env:"JAIL_MEM" envDefault:"5M"`
	Cpu        uint32   `env:"JAIL_CPU" envDefault:"100"`
	Pow        uint32   `env:"JAIL_POW"`
	Port       uint32   `env:"JAIL_PORT" envDefault:"5000"`
	Dev        []string `env:"JAIL_DEV" envDefault:"null,zero,urandom"`
	Syscalls   []string `env:"JAIL_SYSCALLS"`
	TmpSize    size     `env:"JAIL_TMP_SIZE"`
	Env        []string
}

func GetConfig

func GetConfig() (*Config, error)

func (*Config) NsjailListen added in v0.2.0

func (c *Config) NsjailListen() (uint32, bool)

func (*Config) SetConfig

func (c *Config) SetConfig(msg *nsjail.NsJailConfig) error

Jump to

Keyboard shortcuts

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