summaryrefslogtreecommitdiff
path: root/cmd/podman/create.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-01-21 08:49:20 +0100
committerGitHub <noreply@github.com>2019-01-21 08:49:20 +0100
commit4afdfd5eab4d887bf023b39f7b179e422b33a6d5 (patch)
tree788fec7b3b967a33cea0eaef3aec1235aceca5df /cmd/podman/create.go
parentef2f6f9f3ee3a54ffc3b9cd0740230b60dcc8d6a (diff)
parent8cf929c0950e985880b268ae4c8ad08d98bc4073 (diff)
downloadpodman-4afdfd5eab4d887bf023b39f7b179e422b33a6d5.tar.gz
podman-4afdfd5eab4d887bf023b39f7b179e422b33a6d5.tar.bz2
podman-4afdfd5eab4d887bf023b39f7b179e422b33a6d5.zip
Merge pull request #2187 from rhatdan/selinux
Vendor in latest opencontainers/selinux
Diffstat (limited to 'cmd/podman/create.go')
-rw-r--r--cmd/podman/create.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/cmd/podman/create.go b/cmd/podman/create.go
index 1aa3425a5..065d08df4 100644
--- a/cmd/podman/create.go
+++ b/cmd/podman/create.go
@@ -173,7 +173,11 @@ func parseSecurityOpt(config *cc.CreateConfig, securityOpts []string) error {
if err != nil {
return errors.Wrapf(err, "container %q not found", config.PidMode.Container())
}
- labelOpts = append(labelOpts, label.DupSecOpt(ctr.ProcessLabel())...)
+ secopts, err := label.DupSecOpt(ctr.ProcessLabel())
+ if err != nil {
+ return errors.Wrapf(err, "failed to duplicate label %q ", ctr.ProcessLabel())
+ }
+ labelOpts = append(labelOpts, secopts...)
}
if config.IpcMode.IsHost() {
@@ -183,7 +187,11 @@ func parseSecurityOpt(config *cc.CreateConfig, securityOpts []string) error {
if err != nil {
return errors.Wrapf(err, "container %q not found", config.IpcMode.Container())
}
- labelOpts = append(labelOpts, label.DupSecOpt(ctr.ProcessLabel())...)
+ secopts, err := label.DupSecOpt(ctr.ProcessLabel())
+ if err != nil {
+ return errors.Wrapf(err, "failed to duplicate label %q ", ctr.ProcessLabel())
+ }
+ labelOpts = append(labelOpts, secopts...)
}
for _, opt := range securityOpts {