We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3334d03 commit 66cb9dbCopy full SHA for 66cb9db
1 file changed
generate/generate.go
@@ -950,9 +950,17 @@ func (g *Generator) AddBindMount(bind string) error {
950
// SetupPrivileged sets up the priviledge-related fields inside g.spec.
951
func (g *Generator) SetupPrivileged(privileged bool) {
952
if privileged {
953
+ last := capability.CAP_LAST_CAP
954
+ // hack for RHEL6 which has no /proc/sys/kernel/cap_last_cap
955
+ if last == capability.Cap(63) {
956
+ last = capability.CAP_BLOCK_SUSPEND
957
+ }
958
// Add all capabilities in privileged mode.
959
var finalCapList []string
960
for _, cap := range capability.List() {
961
+ if cap > last {
962
+ continue
963
964
finalCapList = append(finalCapList, fmt.Sprintf("CAP_%s", strings.ToUpper(cap.String())))
965
}
966
g.initSpecLinux()
0 commit comments