MCPcopy Create free account
hub / github.com/containers/common / BoundingSet

Function BoundingSet

pkg/capabilities/capabilities.go:73–97  ·  view source on GitHub ↗

BoundingSet returns the capabilities in the current bounding set

()

Source from the content-addressed store, hash-verified

71
72// BoundingSet returns the capabilities in the current bounding set
73func BoundingSet() ([]string, error) {
74 boundingSetOnce.Do(func() {
75 currentCaps, err := capability.NewPid2(0)
76 if err != nil {
77 boundingSetErr = err
78 return
79 }
80 err = currentCaps.Load()
81 if err != nil {
82 boundingSetErr = err
83 return
84 }
85 var r []string
86 for _, c := range capsList {
87 if !currentCaps.Get(capability.BOUNDING, c) {
88 continue
89 }
90 r = append(r, getCapName(c))
91 }
92 boundingSetRet = r
93 sort.Strings(boundingSetRet)
94 boundingSetErr = err
95 })
96 return boundingSetRet, boundingSetErr
97}
98
99// AllCapabilities returns all known capabilities.
100func AllCapabilities() []string {

Callers 4

config_test.goFile · 0.92
TestBoundingCapabilitiesFunction · 0.85
MergeCapabilitiesFunction · 0.85

Calls 2

getCapNameFunction · 0.85
LoadMethod · 0.80

Tested by 2

TestBoundingCapabilitiesFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…