Merge pull request #23024 from rhatdan/selinux

We need to relabel newly created container volumes
Upstream-commit: 6b4fd5f071a1ca240b2ab33439cdf38a5f4004ab
Component: engine
This commit is contained in:
Brian Goff
2016-08-26 13:25:38 -04:00
committed by GitHub

View File

@ -199,6 +199,9 @@ func (container *Container) CopyImagePathContent(v volume.Volume, destination st
logrus.Warnf("error while unmounting volume %s: %v", v.Name(), err)
}
}()
if err := label.Relabel(path, container.MountLabel, true); err != nil && err != syscall.ENOTSUP {
return err
}
return copyExistingContents(rootfs, path)
}