From: Enrico Scholz Date: Fri, 8 Apr 2005 19:18:06 +0000 (+0000) Subject: added better test for patched yum X-Git-Tag: version_0_30_210~277 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aacf41dfd9dfe326f0c76e81e6b6adae0e05f952;p=util-vserver.git added better test for patched yum git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2004 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/scripts/vyum-worker b/util-vserver/scripts/vyum-worker index f899e97..91e8eb4 100755 --- a/util-vserver/scripts/vyum-worker +++ b/util-vserver/scripts/vyum-worker @@ -38,9 +38,24 @@ test -z "$_YUM" || { } yum=${YUM:-yum} +conf=yum.conf case $(yum --version) in - (2.[0123]*) conf=yum-hack.conf;; - (*) conf=yum.conf;; + (2.[0123]*) + python -c 'import yum,sys; sys.exit(not hasattr(yum.config.yumconf, "getRootedPath"))' &>/dev/null || { + warning "\ +You are using a version of yum which is insecure and broken in chroot +related operations; either apply the patches shipped in the 'contrib/' +directory of util-vserver, or ask the author of yum to apply them +(preferred). + +In the meantime, 'vyum' will continue with dirty hacks which might not +work when the vserver is running and local DOS attacks are possible. + +Execution will continue in 5 seconds..." + sleep 5 + conf=yum-hack.conf + } + ;; esac rpmFake.exec $yum \