()
| 221 | } |
| 222 | |
| 223 | func 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 | |
| 234 | func setCurrentCaps(caps *capSnapshot) error { |
| 235 | return unix.Capset(&caps.hdr, &caps.data[0]) |
no outgoing calls
no test coverage detected
searching dependent graphs…