Documentation
¶
Overview ¶
Package capability names the Linux capabilities and parses a capability bounding set as the capability_bounding_set keyword writes it, after the CapabilityBoundingSet of systemd: the capabilities the command keeps, all others dropped, or, the list prefixed with ~, the capabilities it drops.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BoundingSet ¶
type BoundingSet struct {
// Drop says the listed capabilities are the ones dropped, all others
// kept: the list was prefixed with ~.
Drop bool
// Caps are the numbers of the listed capabilities, sorted.
Caps []int
}
BoundingSet is a capability bounding set: the capabilities it lists, and whether they are the ones kept or the ones dropped.
func ParseBoundingSet ¶
func ParseBoundingSet(s string) (BoundingSet, error)
ParseBoundingSet parses s, a list of capability names separated by spaces, optionally prefixed with ~. A name it does not know is an error, so a typo does not leave the command with a capability its configuration meant to drop. An empty s is the empty set kept: every capability is dropped.
func (BoundingSet) Keeps ¶
func (t BoundingSet) Keeps(n int) bool
Keeps says whether the bounding set keeps the capability of number n.
func (BoundingSet) String ¶
func (t BoundingSet) String() string
String returns the bounding set as ParseBoundingSet parses it back, the names in upper case and in number order.