Documentation
¶
Index ¶
- type Jail
- func (j *Jail) Bind(dest, src string)
- func (j *Jail) Build() error
- func (j *Jail) CharDev(path string) error
- func (j *Jail) Copy(path string) error
- func (j *Jail) CopyTo(dest, src string) error
- func (j *Jail) Dispose() error
- func (j *Jail) ExternalPath(internal string) string
- func (j *Jail) MkDir(path string, perm os.FileMode)
- func (j *Jail) Path() string
- func (j *Jail) Unshare() error
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 Create ¶ added in v0.8.1
Create returns a Jail on path, creating the directory if needed. On disposal, the jail will remove the path
func CreateTimestamped ¶ added in v0.8.1
CreateTimestamped returns a Jail on a path composed by prefix and current timestamp, creating the directory. On disposal, the jail will remove the path
func Into ¶ added in v0.8.1
Into returns a Jail on path, assuming it already exists on disk. On disposal, the jail *will not* remove the path
func (*Jail) Build ¶
Build creates the jail, making directories and copying files. If an error setting up is encountered, a best-effort attempt will be made to remove any partial state before returning the error
func (*Jail) CharDev ¶ added in v0.8.1
CharDev enqueues an mknod operation for the given character device at jail building time
func (*Jail) ExternalPath ¶
ExternalPath converts a jail internal path to the equivalent jail external path