Do not prevent mounts in /sys
Mounts in /sys like /sys/fs/cgroup are valid and should be allowed at the libcontainer level. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
3c659cb2ea
commit
02e6427ecf
|
@ -215,7 +215,6 @@ func checkMountDestination(rootfs, dest string) error {
|
|||
}
|
||||
invalidDestinations := []string{
|
||||
"/proc",
|
||||
"/sys",
|
||||
}
|
||||
for _, invalid := range invalidDestinations {
|
||||
path, err := filepath.Rel(filepath.Join(rootfs, invalid), dest)
|
||||
|
|
|
@ -15,8 +15,8 @@ func TestCheckMountDestOnProc(t *testing.T) {
|
|||
func TestCheckMountDestInSys(t *testing.T) {
|
||||
dest := "/rootfs//sys/fs/cgroup"
|
||||
err := checkMountDestination("/rootfs", dest)
|
||||
if err == nil {
|
||||
t.Fatal("destination inside proc should return an error")
|
||||
if err != nil {
|
||||
t.Fatal("destination inside /sys should not return an error")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue