minijail

package
v0.36.1-dev Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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