Skip to content

Commit 89c3c97

Browse files
author
Mrunal Patel
committed
Merge pull request #796 from rhatdan/relabeldev
Need to make sure labels applied to /dev
2 parents e87c59e + 77f312c commit 89c3c97

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libcontainer/rootfs_linux.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ func setupRootfs(config *configs.Config, console *linuxConsole, pipe io.ReadWrit
6969
if err := setupDevSymlinks(config.Rootfs); err != nil {
7070
return newSystemErrorWithCause(err, "setting up /dev symlinks")
7171
}
72+
if err := label.Relabel(filepath.Join(config.Rootfs, "dev"), config.MountLabel, false); err != nil {
73+
return err
74+
}
7275
}
7376
// Signal the parent to run the pre-start hooks.
7477
// The hooks are run after the mounts are setup, but before we switch to the new

0 commit comments

Comments
 (0)