mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-24 13:05:17 +00:00
17 lines
333 B
Go
17 lines
333 B
Go
|
package capabilities
|
||
|
|
||
|
import (
|
||
|
"github.com/syndtr/gocapability/capability"
|
||
|
)
|
||
|
|
||
|
// LastCap return last cap of system
|
||
|
func LastCap() capability.Cap {
|
||
|
last := capability.CAP_LAST_CAP
|
||
|
// hack for RHEL6 which has no /proc/sys/kernel/cap_last_cap
|
||
|
if last == capability.Cap(63) {
|
||
|
last = capability.CAP_BLOCK_SUSPEND
|
||
|
}
|
||
|
|
||
|
return last
|
||
|
}
|