capabilities

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRequired

func CheckRequired(reqCaps []cap.Value) error

CheckRequired check if given capabilities include all required capabilities in the effective set. If the error is of the MissingCapabilitiesError type, it means some capabilities are missing. Other errors might rise because of capabilities extraction failure, or internal errors.

func DropUnrequired added in v0.8.0

func DropUnrequired(reqCaps []cap.Value) error

DropUnrequired drops all capabilities not required by user from Effective and Permitted set, and all capabilities from the Inheritance set. DropUnrequired requires that all required capabilities are already set or available in permitted set. The function also tries to drop the capabilities bounding set, but it won't work if CAP_SETPCAP is not available.

Types

type DropCapabilitiesError added in v0.8.0

type DropCapabilitiesError struct {
	Err error
}

func (*DropCapabilitiesError) Error added in v0.8.0

func (dropCapErr *DropCapabilitiesError) Error() string

func (*DropCapabilitiesError) Is added in v0.8.0

func (dropCapErr *DropCapabilitiesError) Is(target error) bool

func (*DropCapabilitiesError) Unwrap added in v0.8.0

func (dropCapErr *DropCapabilitiesError) Unwrap() error

type MissingCapabilitiesError added in v0.8.0

type MissingCapabilitiesError struct {
	MissingCaps []cap.Value
}

func (*MissingCapabilitiesError) Error added in v0.8.0

func (missCapErr *MissingCapabilitiesError) Error() string

func (*MissingCapabilitiesError) Is added in v0.8.0

func (missCapErr *MissingCapabilitiesError) Is(target error) bool

Jump to

Keyboard shortcuts

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