Skip to content

Commit

Permalink
fix: don't drop ability to use ambient capabilities
Browse files Browse the repository at this point in the history
This fixes KubeVirt on Talos in default mode.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
  • Loading branch information
smira committed Oct 25, 2021
1 parent b6b78e7 commit 60ad006
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,6 @@ func DropCapabilities(seq runtime.Sequence, data interface{}) (runtime.TaskExecu
return nil
}

// Disallow raising ambient capabilities (ever).
secbits := cap.GetSecbits()
secbits |=
cap.SecbitNoCapAmbientRaise | cap.SecbitNoCapAmbientRaiseLocked

if err := secbits.Set(); err != nil {
return fmt.Errorf("error setting secbits: %w", err)
}

// Drop capabilities from the bounding set effectively disabling it for all forked processes,
// but keep them for PID 1.
droppedCapabilities := []cap.Value{
Expand Down

0 comments on commit 60ad006

Please sign in to comment.