aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-14 16:09:43 +0200
committerGitHub <noreply@github.com>2020-04-14 16:09:43 +0200
commite2a137327c09a4fb3540d9bc9bda7685d4df0500 (patch)
tree85ffafbf00fccae4586322abcb20b7f80b0f9922 /cmd
parent26c15358d23339e068286ab2bdf8fedb14e90dbd (diff)
parent8fea3d0ab57f487c48e4f06361f7933dd239a0e0 (diff)
downloadpodman-e2a137327c09a4fb3540d9bc9bda7685d4df0500.tar.gz
podman-e2a137327c09a4fb3540d9bc9bda7685d4df0500.tar.bz2
podman-e2a137327c09a4fb3540d9bc9bda7685d4df0500.zip
Merge pull request #5804 from rhatdan/seccomp
Need to set security options even if user does not specify options
Diffstat (limited to 'cmd')
-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