minijail

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvPrefix = "CIFUZZ_MINIJAIL_"

	DebugEnvVarName    = EnvPrefix + "DEBUG"
	BindingsEnvVarName = EnvPrefix + "BINDINGS"

	BindingFlag = "bind"
	EnvFlag     = "env"

	// Mount flags as defined in golang.org/x/sys/unix. We're not using
	// that package because it's not available on macOS.
	MS_RDONLY      = 0x1
	MS_NOSUID      = 0x2
	MS_NODEV       = 0x4
	MS_BIND        = 0x1000
	MS_REC         = 0x4000
	MS_STRICTATIME = 0x1000000
)

Variables

This section is empty.

Functions

func AddMinijailBindingDeprecated deprecated

func AddMinijailBindingDeprecated(path string, writable WritableOption) error

Deprecated: Use AddMinijailBindingToEnv instead, which doesn't use os.Setenv. TODO(adrian): AddMinijailBindingDeprecated will be removed once all adapters are rewritten (CIFUZZ-1289).

func AddMinijailBindingToEnv

func AddMinijailBindingToEnv(env []string, binding *Binding) ([]string, error)

func IsIgnoredLine added in v0.1.5

func IsIgnoredLine(line string) bool

func NewMinijail

func NewMinijail(opts *Options) (*minijail, error)

Types

type Binding

type Binding struct {
	Source   string
	Target   string
	Writable WritableOption
}

func BindingFromString

func BindingFromString(s string) (*Binding, error)

func (*Binding) String

func (b *Binding) String() string

type Options

type Options struct {
	Args      []string
	Env       []string
	Bindings  []*Binding
	OutputDir string
}

type OutputFilter

type OutputFilter struct {
	// contains filtered or unexported fields
}

func NewOutputFilter

func NewOutputFilter(nextWriter io.Writer) *OutputFilter

func (*OutputFilter) Write

func (w *OutputFilter) Write(p []byte) (int, error)

type WritableOption

type WritableOption int
const (
	ReadOnly WritableOption = iota
	ReadWrite
)

Jump to

Keyboard shortcuts

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