If anybody is running vservers with the util-vserver-0.30 utilities
he/she may want to have a look at the attached patch below.

Normally I'd have waited until the package maintainer (Enrico Scholz)
had checked the patch and give it a official ok but I think the
addressed problem is really serious and any sysadmin should have a
chance to decide for himself as soon as possible.

-- 
   Klaus ter Fehn          Wagnerstr. 4    Mobile: +49-172-2529379
                     40212 Duesseldorf     Phone:  +49-211-356880
     [EMAIL PROTECTED]            FRG/Germany     Fax:    +49-211-356881

          ... to boldly code where no byte has gone before ...
--- util-vserver-0.30/scripts/vserver   2004-02-06 23:10:50.000000000 +0100
+++ util-vserver-0.30-ktf/scripts/vserver       2004-07-31 01:58:13.000000000 +0200
@@ -296,12 +296,16 @@
                    cp -ax /sbin /bin /etc /usr /var /lib $VROOTDIR/$1/. || exit 1
                fi
                cd $VROOTDIR/$1 || exit 1
-               rm -fr lib/modules/*
-               rm -f var/spool/mail/*
-               rm -f `find var/run -type f`
-               rm -f `find var/log -type f`
+               rm -rf lib/modules
+               mkdir lib/modules       # is that directory needed anyway?
+               chmod 755 lib/modules
+               find var/spool/mail -type f -print0 | xargs -0r rm --
+               find var/run -type f -print0 | xargs -0r rm --
+               find var/log -type f -print0 | xargs -0r rm --
                touch var/log/wtmp
-               rm -f var/lock/subsys/*
+               rm -rf var/lock/subsys
+               mkdir var/lock/subsys
+               chmod 0755 var/lock/subsys
                rm -f etc/cron.d/kmod
                mkdir proc tmp home root boot
                test -f /root/.bashrc && cp -a /root/.bashrc root/.
@@ -458,11 +462,13 @@
                        echo export PROFILE=$PROFILE >etc/PROFILE
                fi
 
-               rm -f `find var/run -type f`
+               find var/run -type f -print0 | xargs -0r rm -f --
                touch var/run/utmp
                chgrp ${UTMP_GROUP:-utmp} var/run/utmp
                chmod 0664 var/run/utmp
-               rm -f  var/lock/subsys/*
+               rm -rf var/lock/subsys
+               mkdir var/lock/subsys
+               chmod 0755 var/lock/subsys
                mountproc $VROOTDIR/$1
                CTXOPT=
                HOSTOPT=
_______________________________________________
Vserver mailing list
[EMAIL PROTECTED]
http://list.linux-vserver.org/mailman/listinfo/vserver

Reply via email to