From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9CEF3198005 for ; Wed, 27 Feb 2013 21:43:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 51016E0AC5; Wed, 27 Feb 2013 21:43:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 78AFEE0AC3 for ; Wed, 27 Feb 2013 21:43:11 +0000 (UTC) Received: from pomiocik.lan (77-253-193-205.adsl.inetia.pl [77.253.193.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 9522233DF43; Wed, 27 Feb 2013 21:43:09 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: python@gentoo.org, =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH 3/8] Avoid writing outside WORKDIR if S=${WORKDIR}. Date: Wed, 27 Feb 2013 22:43:20 +0100 Message-Id: <1362001405-25636-3-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <20130227224152.6d1293c9@pomiocik.lan> References: <20130227224152.6d1293c9@pomiocik.lan> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: 6bcbd720-71e0-4ae0-b999-87cc0e49e2ec X-Archives-Hash: 883b91974c91ec16b4b7ed3f339b5970 --- gx86/eclass/multibuild.eclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gx86/eclass/multibuild.eclass b/gx86/eclass/multibuild.eclass index d42b8a7..a4d5d11 100644 --- a/gx86/eclass/multibuild.eclass +++ b/gx86/eclass/multibuild.eclass @@ -99,6 +99,10 @@ multibuild_foreach() { || die "MULTIBUILD_VARIANTS need to be set" local bdir=${BUILD_DIR:-${S}} + + # Avoid writing outside WORKDIR if S=${WORKDIR}. + [[ ${bdir%%/} == ${WORKDIR%%/} ]] && bdir=${WORKDIR}/build + local prev_id=${MULTIBUILD_ID:+${MULTIBUILD_ID}-} local ret=0 lret=0 v -- 1.8.1.4