From 647fedc2a2bc84a3e199ae86d5a7c6608d3968cc Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 15 Mar 2018 14:16:07 -0400 Subject: 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 Closes: #502 Approved by: mheon --- cmd/podman/mount.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'cmd/podman') 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 @@ -23,10 +23,6 @@ var ( Name: "notruncate", 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()) } -- cgit v1.2.3-54-g00ecf