Need to make sure labels applied to /dev

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
Dan Walsh 2016-04-30 06:30:16 -04:00
parent e87c59e2e4
commit 77f312c51c
1 changed files with 3 additions and 0 deletions

View File

@ -69,6 +69,9 @@ func setupRootfs(config *configs.Config, console *linuxConsole, pipe io.ReadWrit
if err := setupDevSymlinks(config.Rootfs); err != nil { if err := setupDevSymlinks(config.Rootfs); err != nil {
return newSystemErrorWithCause(err, "setting up /dev symlinks") return newSystemErrorWithCause(err, "setting up /dev symlinks")
} }
if err := label.Relabel(filepath.Join(config.Rootfs, "dev"), config.MountLabel, false); err != nil {
return err
}
} }
// Signal the parent to run the pre-start hooks. // Signal the parent to run the pre-start hooks.
// The hooks are run after the mounts are setup, but before we switch to the new // The hooks are run after the mounts are setup, but before we switch to the new