Browse code

Remove undeeded and broken selinux relabel call

The call is not needed here and wouldn't really work since `Source` in
this case is a volume name.
Further we don't neccessarily even have a volume path at this time since
the volume hasn't been mounted yet.

The volume will be relabled either:

1. When data gets copied to it from the image (if applicable) -- https://github.com/docker/docker/blob/master/container/container_unix.go#L196
2. When the container is started -- https://github.com/docker/docker/blob/master/daemon/oci_linux.go#L737

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 898e84d5fd1ad502632eb4082b7be37a65599a3b)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>

Brian Goff authored on 2017/03/23 03:43:33
Showing 1 changed files
... ...
@@ -16,7 +16,6 @@ import (
16 16
 	"github.com/docker/docker/container"
17 17
 	"github.com/docker/docker/volume"
18 18
 	"github.com/docker/docker/volume/drivers"
19
-	"github.com/opencontainers/runc/libcontainer/label"
20 19
 )
21 20
 
22 21
 var (
... ...
@@ -195,9 +194,6 @@ func (daemon *Daemon) registerMountPoints(container *container.Container, hostCo
195 195
 				return err
196 196
 			}
197 197
 
198
-			if err := label.Relabel(mp.Source, container.MountLabel, false); err != nil {
199
-				return err
200
-			}
201 198
 			mp.Volume = v
202 199
 			mp.Name = v.Name()
203 200
 			mp.Driver = v.DriverName()