capsicum

package
v0.0.0-...-7de167f Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ECAPMODE    = syscall.Errno(C.ECAPMODE)
	ENOTCAPABLE = syscall.Errno(C.ENOTCAPABLE)
)

Variables

This section is empty.

Functions

func CapEnter

func CapEnter() error

func CapRightsClear

func CapRightsClear(r *CapRights, rights ...uint64) error

func CapRightsIsSet

func CapRightsIsSet(r *CapRights, rights ...uint64) (bool, error)

func CapRightsLimit

func CapRightsLimit(f *os.File, r *CapRights) error

func CapRightsLimitFd

func CapRightsLimitFd(fd uintptr, r *CapRights) error

FIXME: should take a File, not an fd?

func CapRightsSet

func CapRightsSet(r *CapRights, rights ...uint64) error

func Dup

func Dup(f *os.File) (*os.File, error)

func LimitStd

func LimitStd() error

func ListAllFDs

func ListAllFDs() error

func OpenFileAt

func OpenFileAt(f *os.File, name string, flag int, perm os.FileMode) (*os.File, error)

OpenFileAt is the generalized open call; most users will use Open or Create instead. It opens the named file with specified flag (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful, methods on the returned File can be used for I/O. If there is an error, it will be of type *PathError. FIXME: this is mostly just os.OpenFile - probably that should call this

func PrintRights

func PrintRights(fd int)

func ReaddirnamesAt

func ReaddirnamesAt(f *os.File) ([]string, error)

like ioutil.ReadDir, but from an already open file

func ReadlinkAt

func ReadlinkAt(f *os.File, path string) (string, error)

Types

type Address

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

type CapRights

type CapRights C.struct_cap_rights

func CapRightsGet

func CapRightsGet(f *os.File) (*CapRights, error)

func CapRightsGetFd

func CapRightsGetFd(fd uintptr) (*CapRights, error)

func CapRightsInit

func CapRightsInit(rights ...uint64) (*CapRights, error)

func (*CapRights) String

func (r *CapRights) String() string

type FD

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

func GetAllFDInfo

func GetAllFDInfo() ([]*FD, error)

FIXME: an evil program could mess with this by dup()ing and close()ing a lot...

func (FD) String

func (fd FD) String() string

type FDDisappeared

type FDDisappeared struct{}

func (FDDisappeared) String

func (FDDisappeared) String() string

type FDFile

type FDFile struct{}

func (FDFile) String

func (FDFile) String() string

type FDInfo

type FDInfo interface {
	String() string
}

type FDSocket

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

func (FDSocket) String

func (i FDSocket) String() string

type FDType

type FDType int
const (
	FILE FDType = iota
	SOCKET
)

type NilInfo

type NilInfo struct{}

func (NilInfo) String

func (NilInfo) String() string

type SocketStatus

type SocketStatus int
const (
	LISTEN SocketStatus = iota
	CLIENT
	UNKNOWN
)

Jump to

Keyboard shortcuts

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