Merge pull request #20834 from rhatdan/relabelvolume

Do not relabel if user did not request it for non local volumes
Upstream-commit: 8142ebb0be765e6a1ac718d292bb66f7acb145de
Component: engine
This commit is contained in:
Antonio Murdaca
2016-03-04 13:17:54 +01:00
+3 -1
View File
@@ -128,7 +128,9 @@ func (daemon *Daemon) registerMountPoints(container *container.Container, hostCo
// bind.Name is an already existing volume, we need to use that here
bind.Driver = v.DriverName()
bind.Named = true
bind = setBindModeIfNull(bind)
if bind.Driver == "local" {
bind = setBindModeIfNull(bind)
}
}
if label.RelabelNeeded(bind.Mode) {
if err := label.Relabel(bind.Source, container.MountLabel, label.IsShared(bind.Mode)); err != nil {