summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-03-15 14:16:07 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-15 19:08:54 +0000
commit647fedc2a2bc84a3e199ae86d5a7c6608d3968cc (patch)
tree3c73396418928cc677fb5dfc1b3ce06dccd90079 /cmd/podman
parent4bc166446d61f9fde69c91e73b6043b8ba9040fc (diff)
downloadpodman-647fedc2a2bc84a3e199ae86d5a7c6608d3968cc.tar.gz
podman-647fedc2a2bc84a3e199ae86d5a7c6608d3968cc.tar.bz2
podman-647fedc2a2bc84a3e199ae86d5a7c6608d3968cc.zip
We should not allow a user to mount a container with a different label
We need to get the label from the container and mount with it. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #502 Approved by: mheon
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/mount.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/cmd/podman/mount.go b/cmd/podman/mount.go
index 6d640d3b4..6c6b89ee9 100644
--- a/cmd/podman/mount.go
+++ b/cmd/podman/mount.go
@@ -24,10 +24,6 @@ var (
Usage: "do not truncate output",
},
cli.StringFlag{
- Name: "label",
- Usage: "SELinux label for the mount point",
- },
- cli.StringFlag{
Name: "format",
Usage: "Change the output format to Go template",
},
@@ -83,7 +79,7 @@ func mountCmd(c *cli.Context) error {
if err != nil {
return errors.Wrapf(err, "error looking up container %q", args[0])
}
- mountPoint, err := ctr.Mount(c.String("label"))
+ mountPoint, err := ctr.Mount(ctr.MountLabel())
if err != nil {
return errors.Wrapf(err, "error mounting container %q", ctr.ID())
}