libcontainer: remove workaround for RHEL6 kernels

This was a workaround for RHEL6 (2.6.xx) kernels, which have not
been supported by container runtimes for a long time, so should
be safe to remove this workaround.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2020-09-19 10:45:38 +02:00
parent 373811bad4
commit b9e26ad8c6
+1 -6
View File
@@ -16,13 +16,8 @@ var capabilityMap map[string]capability.Cap
func init() {
capabilityMap = make(map[string]capability.Cap)
last := capability.CAP_LAST_CAP
// workaround for RHEL6 which has no /proc/sys/kernel/cap_last_cap
if last == capability.Cap(63) {
last = capability.CAP_BLOCK_SUSPEND
}
for _, c := range capability.List() {
if c > last {
if c > capability.CAP_LAST_CAP {
continue
}
capKey := fmt.Sprintf("CAP_%s", strings.ToUpper(c.String()))