/dev/mqueue has to be labeled correctly

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
This commit is contained in:
Dan Walsh 2015-04-06 23:12:59 -04:00
parent bd8ec36106
commit f7f332bb2c
1 changed files with 9 additions and 1 deletions

View File

@ -72,11 +72,19 @@ func mountToRootfs(m *configs.Mount, rootfs, mountLabel string) error {
}
switch m.Device {
case "proc", "mqueue", "sysfs":
case "proc", "sysfs":
if err := os.MkdirAll(dest, 0755); err != nil && !os.IsExist(err) {
return err
}
return syscall.Mount(m.Source, dest, m.Device, uintptr(m.Flags), "")
case "mqueue":
if err := os.MkdirAll(dest, 0755); err != nil && !os.IsExist(err) {
return err
}
if err := syscall.Mount(m.Source, dest, m.Device, uintptr(m.Flags), ""); err != nil {
return err
}
return label.SetFileLabel(dest, mountLabel)
case "tmpfs":
stat, err := os.Stat(dest)
if err != nil {