minijail

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BindingsEnvVarName is an environment variable which users can
	// use to specify additional Minijail bindings. The bindings must
	// be separated by colon and can be specified in the same format
	// that is supported by minijail's --bind-mount flag:
	// <src>[,[dest][,<writeable>]], where <src> must be an absolute
	// path and <writeable> is either 0 or 1.
	BindingsEnvVarName = "CIFUZZ_MINIJAIL_BINDINGS"

	// 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       //nolint:all
	MS_NOSUID      = 0x2       //nolint:all
	MS_NODEV       = 0x4       //nolint:all
	MS_BIND        = 0x1000    //nolint:all
	MS_REC         = 0x4000    //nolint:all
	MS_STRICTATIME = 0x1000000 //nolint:all
)

Variables

This section is empty.

Functions

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
	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