mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-23 00:38:26 +00:00
bc4bfb94a2
Signed-off-by: Evan Lezar <elezar@nvidia.com>
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
|
|
}
|