MCPcopy Index your code
hub / github.com/containerd/containerd / getCurrentCaps

Function getCurrentCaps

pkg/sys/unshare_linux.go:223–232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

221}
222
223func getCurrentCaps() (*capSnapshot, error) {
224 caps := &capSnapshot{}
225 caps.hdr.Version = unix.LINUX_CAPABILITY_VERSION_3
226
227 err := unix.Capget(&caps.hdr, &caps.data[0])
228 if err != nil {
229 return nil, err
230 }
231 return caps, nil
232}
233
234func setCurrentCaps(caps *capSnapshot) error {
235 return unix.Capset(&caps.hdr, &caps.data[0])

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…