aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-10-02 09:07:50 -0700
committerGitHub <noreply@github.com>2018-10-02 09:07:50 -0700
commit506ae3650b906e920b0b04d5f1bbe15873a90da1 (patch)
treea07b28e4da5fb1e1a3416d7ac14b9809dacdce2e /cmd
parent89c5804fe0ca3ece7587adb5d5c974dbc494f721 (diff)
parent86d435f32fc4230481d789499973c07a5b5ae78d (diff)
downloadpodman-506ae3650b906e920b0b04d5f1bbe15873a90da1.tar.gz
podman-506ae3650b906e920b0b04d5f1bbe15873a90da1.tar.bz2
podman-506ae3650b906e920b0b04d5f1bbe15873a90da1.zip
Merge pull request #1576 from rhatdan/label
Disable SELinux labeling if --privileged
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/create.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/podman/create.go b/cmd/podman/create.go
index fc0c71536..574137271 100644
--- a/cmd/podman/create.go
+++ b/cmd/podman/create.go
@@ -784,7 +784,9 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
VolumesFrom: c.StringSlice("volumes-from"),
}
- if !config.Privileged {
+ if config.Privileged {
+ config.LabelOpts = label.DisableSecOpt()
+ } else {
if err := parseSecurityOpt(config, c.StringSlice("security-opt")); err != nil {
return nil, err
}