forgot to read in xid from python args
[util-vserver.git] / scripts / vcached
index 27d8a9b..19e0dff 100755 (executable)
@@ -17,7 +17,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (c) 2004  The Trustees of Princeton University (Trustees).
 #
-# $Id: vcached,v 1.7 2004/11/17 20:34:25 mef Exp $
+# $Id: vcached,v 1.9 2004/11/23 14:47:35 mlhuang Exp $
 #
 
 # get configuration
@@ -57,8 +57,10 @@ test -e "$UTIL_VSERVER_VARS" || {
 }
 . "$UTIL_VSERVER_VARS"
 
+# make sure barrier bit is set on /vservers to prevent chroot() escapes
+$PKGLIBDIR/setattr --barrier $VROOTDIR
+
 # take out the trash
-chattr -R -i "$VROOTDIR/.vtmp"
 rm -rf "$VROOTDIR/.vtmp"
 
 mkdir -p "$VROOTDIR/.vcache"
@@ -87,7 +89,6 @@ while : ; do
                echo "$(date) v$i ready"
            else
                echo "$(date) Error $RETVAL building v$i"
-               chattr -R -i "$TMP"
                rm -rf "$TMP"
            fi
        fi