Update containers/buildah v1.24.1

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2022-02-03 18:33:22 -05:00
parent 608b6142ed
commit 1d1b2b1509
42 changed files with 1491 additions and 1224 deletions

View File

@@ -902,29 +902,30 @@ func setCapabilities(spec *specs.Spec, keepCaps ...string) error {
capability.AMBIENT: spec.Process.Capabilities.Ambient,
}
knownCaps := capability.List()
noCap := capability.Cap(-1)
for capType, capList := range capMap {
for _, capToSet := range capList {
cap := capability.CAP_LAST_CAP
cap := noCap
for _, c := range knownCaps {
if strings.EqualFold("CAP_"+c.String(), capToSet) {
cap = c
break
}
}
if cap == capability.CAP_LAST_CAP {
if cap == noCap {
return errors.Errorf("error mapping capability %q to a number", capToSet)
}
caps.Set(capType, cap)
}
for _, capToSet := range keepCaps {
cap := capability.CAP_LAST_CAP
cap := noCap
for _, c := range knownCaps {
if strings.EqualFold("CAP_"+c.String(), capToSet) {
cap = c
break
}
}
if cap == capability.CAP_LAST_CAP {
if cap == noCap {
return errors.Errorf("error mapping capability %q to a number", capToSet)
}
if currentCaps.Get(capType, cap) {