jail

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Jail

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

Jail is a Chroot jail builder

func New

func New(path string, perm os.FileMode) *Jail

New returns a Jail for path

func TimestampedJail

func TimestampedJail(prefix string, perm os.FileMode) *Jail

TimestampedJail return a Jail with Path composed by prefix and current timestamp

func (*Jail) Bind

func (j *Jail) Bind(dest, src string)

Bind enqueues a bind mount operation at jail building time

func (*Jail) Build

func (j *Jail) Build() error

Build creates the jail, making directories and copying files

func (*Jail) Copy

func (j *Jail) Copy(path string) error

Copy enqueues a file copy operation at jail building time

func (*Jail) CopyTo

func (j *Jail) CopyTo(dest, src string) error

CopyTo enqueues a file copy operation at jail building time

func (*Jail) Dispose

func (j *Jail) Dispose() error

Dispose erases everything inside the jail

func (*Jail) ExternalPath

func (j *Jail) ExternalPath(internal string) string

ExternalPath converts a jail internal path to the equivalent jail external path

func (*Jail) LazyUnbind

func (j *Jail) LazyUnbind() error

LazyUnbind detaches all binded mountpoints

func (*Jail) MkDir

func (j *Jail) MkDir(path string, perm os.FileMode)

MkDir enqueue a mkdir operation at jail building time

func (*Jail) Path

func (j *Jail) Path() string

Path returns the path of the jail

Jump to

Keyboard shortcuts

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