Documentation
¶
Overview ¶
Package sandbox confines the files a request file may read or write to a file root. Every path that comes from a request file (bodies, multipart files, `output`, certificates, keys, netrc and cookie files, unix sockets) goes through a Root; paths given on the command line do not.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDenied = errors.New("access denied outside file root")
ErrDenied reports a path outside the file root (after resolving `..` and symbolic links).
Functions ¶
This section is empty.
Types ¶
type Root ¶
type Root struct {
// contains filtered or unexported fields
}
Root is a directory that confines file access.
func (*Root) Path ¶
Path returns the absolute path of name after checking that it stays in the root, for the APIs that need a path (unix sockets).
Click to show internal directories.
Click to hide internal directories.