From 77f312c51c8d78ba8831c307e899d25959b9db32 Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Sat, 30 Apr 2016 06:30:16 -0400 Subject: [PATCH] Need to make sure labels applied to /dev Signed-off-by: Dan Walsh --- libcontainer/rootfs_linux.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libcontainer/rootfs_linux.go b/libcontainer/rootfs_linux.go index fe1db75eb..4ff01c058 100644 --- a/libcontainer/rootfs_linux.go +++ b/libcontainer/rootfs_linux.go @@ -69,6 +69,9 @@ func setupRootfs(config *configs.Config, console *linuxConsole, pipe io.ReadWrit if err := setupDevSymlinks(config.Rootfs); err != nil { 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. // The hooks are run after the mounts are setup, but before we switch to the new