From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6D321158020 for ; Thu, 8 Dec 2022 21:29:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A4B86E08EC; Thu, 8 Dec 2022 21:29:11 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5F294E08A8 for ; Thu, 8 Dec 2022 21:29:11 +0000 (UTC) From: James Le Cuirot To: gentoo-dev Cc: James Le Cuirot Subject: [gentoo-dev] [PATCH 1/2] acct-group.eclass: Don't modify groups when EPREFIX is non-empty Date: Thu, 8 Dec 2022 21:28:53 +0000 Message-Id: <20221208212854.3825-2-chewi@gentoo.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208212854.3825-1-chewi@gentoo.org> References: <20221208212854.3825-1-chewi@gentoo.org> 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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 0fa62b03-0e21-4a8b-b00b-46a93a562034 X-Archives-Hash: f575945643127f413c3c43e812580e1a This was happening when running a prefix as root, which we don't really support, but also when building a prefixed system under ROOT. Closes: https://bugs.gentoo.org/779181 Signed-off-by: James Le Cuirot --- eclass/acct-group.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass index 590a2f20ed8e..f55c9f4c9587 100644 --- a/eclass/acct-group.eclass +++ b/eclass/acct-group.eclass @@ -157,7 +157,7 @@ acct-group_src_install() { acct-group_pkg_preinst() { debug-print-function ${FUNCNAME} "${@}" - if [[ ${EUID} -ne 0 ]]; then + if [[ ${EUID} -ne 0 || -n ${EPREFIX} ]]; then einfo "Insufficient privileges to execute ${FUNCNAME[0]}" return fi -- 2.38.1