summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-04-13 17:07:51 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-04-13 17:09:22 -0400
commit8fea3d0ab57f487c48e4f06361f7933dd239a0e0 (patch)
treec14f6da85720784eef58ac9fcd9da0c9eb0309db /cmd/podman
parent5cf64aee11063bc8e7ff22f1365b0bf6b3ab0900 (diff)
downloadpodman-8fea3d0ab57f487c48e4f06361f7933dd239a0e0.tar.gz
podman-8fea3d0ab57f487c48e4f06361f7933dd239a0e0.tar.bz2
podman-8fea3d0ab57f487c48e4f06361f7933dd239a0e0.zip
Need to set security options even if user does not specify options
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/shared/create.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go
index 68a36d967..94b1e63dc 100644
--- a/cmd/podman/shared/create.go
+++ b/cmd/podman/shared/create.go
@@ -783,10 +783,12 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod.
Sysctl: sysctl,
}
+ var securityOpt []string
if c.Changed("security-opt") {
- if err := secConfig.SetSecurityOpts(runtime, c.StringArray("security-opt")); err != nil {
- return nil, err
- }
+ securityOpt = c.StringArray("security-opt")
+ }
+ if err := secConfig.SetSecurityOpts(runtime, securityOpt); err != nil {
+ return nil, err
}
// SECCOMP