Make namespace cleanup look at whole paths, fixing guests with the same beginning...
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Thu, 25 Feb 2010 16:00:08 +0000 (16:00 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Thu, 25 Feb 2010 16:00:08 +0000 (16:00 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2881 94cd875c-1c1d-0410-91d2-eb244daf1a30

scripts/vserver.functions

index 59846ab..ed487fa 100644 (file)
@@ -1382,7 +1382,8 @@ function _namespaceCleanup
     while read -r dev path opts; do
        test -n "$path" || continue
        for i in "$root" /dev /proc; do
-           test "${path#$i}" != "$path" && continue 2
+           path_dir="${path}/"
+           test "${path_dir#${i}/}" != "${path_dir}" && continue 2
        done
        for i in "${list[@]}" /; do
            test "$path" = "$i" && continue 2