Commit Graph

6 Commits

Author SHA1 Message Date
Daniel J Walsh 542311225b Fix handling of all capabilities
You should be able to specify --cap-add=all --cap-drop=cap_perfmon
And end up with all capabilties except cap_perfmon.

You should not be allowed to specify --cap-add all --cap-drop all

The outcome would be undefined.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-14 07:04:14 -04:00
Giuseppe Scrivano 0392037151 capabilities: ALL returns the bounding set
follow up to "capabilities: add new method BoundingSet()".

When ALL is used, limit it to the known capabilities in the bounding
set instead of ALL the known capabilities.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-19 15:58:49 +01:00
Giuseppe Scrivano 389df0ae1f capabilities: add new method BoundingSet()
add a new public function to retrieve all the capabilities in the
current bounding set.

This is useful for Podman to use only these capabilities when running
with --privileged as it can break running in a container where the
available capabilities can be a subset of the ones available in the
kernel.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-18 20:30:40 +01:00
Daniel J Walsh bfada097cc Export NormalizeCapabilities function
We need access to this function in Podman to translate
user entry into standardized format.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-10 08:47:58 -04:00
Daniel J Walsh e0c60444e2 Fix capability testing
Also normalize the base list of capabilities.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-03-27 06:54:58 -04:00
Daniel J Walsh badb4562d3 Add capabilities testing as well
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-03-23 09:17:38 -04:00