diff --git a/virtcontainers/mount.go b/virtcontainers/mount.go index e4a7dfb27..ba712ac4b 100644 --- a/virtcontainers/mount.go +++ b/virtcontainers/mount.go @@ -18,7 +18,7 @@ import ( var rootfsDir = "rootfs" -var systemMountPrefixes = []string{"/proc", "/dev", "/sys"} +var systemMountPrefixes = []string{"/proc", "/sys"} func isSystemMount(m string) bool { for _, p := range systemMountPrefixes { diff --git a/virtcontainers/mount_test.go b/virtcontainers/mount_test.go index 4795932f5..6818af6d9 100644 --- a/virtcontainers/mount_test.go +++ b/virtcontainers/mount_test.go @@ -31,7 +31,8 @@ func TestIsSystemMount(t *testing.T) { {"/sys/fs/cgroup", true}, {"/sysfoo", false}, {"/home", false}, - {"/dev/block/", true}, + {"/dev/block/", false}, + {"/mnt/dev/foo", false}, } for _, test := range tests {