From 13cfdb0742ebf7fbf2d90e82e527a5386d030ab8 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Mon, 22 Jun 2020 16:08:09 -0400 Subject: Fix conflicts between privileged and other flags The `--privileged` flag does not conflict with `--group-add` (this one was breaking Toolbox) and does not conflict with most parts of `--security-opt` (this was breaking Openstack). Signed-off-by: Matthew Heon --- pkg/specgen/container_validate.go | 4 ---- pkg/specgen/specgen.go | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'pkg/specgen') diff --git a/pkg/specgen/container_validate.go b/pkg/specgen/container_validate.go index 45179343b..33bacecaf 100644 --- a/pkg/specgen/container_validate.go +++ b/pkg/specgen/container_validate.go @@ -61,10 +61,6 @@ func (s *SpecGenerator) Validate() error { // // ContainerSecurityConfig // - // groups and privileged are exclusive - if len(s.Groups) > 0 && s.Privileged { - return exclusiveOptions("Groups", "privileged") - } // capadd and privileged are exclusive if len(s.CapAdd) > 0 && s.Privileged { return exclusiveOptions("CapAdd", "privileged") diff --git a/pkg/specgen/specgen.go b/pkg/specgen/specgen.go index bb01a5d14..77b1353c4 100644 --- a/pkg/specgen/specgen.go +++ b/pkg/specgen/specgen.go @@ -207,6 +207,7 @@ type ContainerSecurityConfig struct { // - Adds all devices on the system to the container. // - Adds all capabilities to the container. // - Disables Seccomp, SELinux, and Apparmor confinement. + // (Though SELinux can be manually re-enabled). // TODO: this conflicts with things. // TODO: this does more. Privileged bool `json:"privileged,omitempty"` -- cgit v1.2.3-54-g00ecf