Skip to content

Commit 64890be

Browse files
committed
capabilities: be more graceful in resetting ambient
Similar to when SetAmbient() can fail, runc should be graceful about ResetAmbient failing. This functionality previously worked under gvisor, which doesn't implement ambient capabilities atm. The hard error on reset broke gvisor usage.
1 parent a7d7645 commit 64890be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcontainer/capabilities/capabilities.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func (c *Caps) ApplyCaps() error {
130130
ambs := c.caps[capability.AMBIENT]
131131
err := capability.ResetAmbient()
132132
if err != nil {
133-
return fmt.Errorf("can't reset ambient capabilities: %w", err)
133+
logrus.Warnf("can't reset ambient capabilities %w", err)
134134
}
135135
for _, a := range ambs {
136136
err := capability.SetAmbient(true, a)

0 commit comments

Comments
 (0)