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 EECD7158086 for ; Mon, 27 Dec 2021 03:51:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B9B812BC007; Mon, 27 Dec 2021 03:51:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 1439B2BC007 for ; Mon, 27 Dec 2021 03:51:55 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 smtp.gentoo.org (Postfix) with ESMTPS id 277F6342F38 for ; Mon, 27 Dec 2021 03:51:53 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 90EB21BF for ; Mon, 27 Dec 2021 03:51:51 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1640577085.8ba1318bc1779637a83319f05992a11e83b84069.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/shadow/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/shadow/shadow-4.10-r3.ebuild sys-apps/shadow/shadow-4.10-r4.ebuild X-VCS-Directories: sys-apps/shadow/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 8ba1318bc1779637a83319f05992a11e83b84069 X-VCS-Branch: master Date: Mon, 27 Dec 2021 03:51:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9f7e88b5-9217-41f0-a40d-a334a35a797d X-Archives-Hash: 040927a32c18e8c3ea74973eae496c28 commit: 8ba1318bc1779637a83319f05992a11e83b84069 Author: Sam James gentoo org> AuthorDate: Mon Dec 27 03:13:52 2021 +0000 Commit: Sam James gentoo org> CommitDate: Mon Dec 27 03:51:25 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ba1318b sys-apps/shadow: check for invalid passwd entries - In pkg_postinst, check for invalid ${EROOT}/etc/passwd entries by running 'pwck' in read-only mode. In the referenced bug, this manifested as the man cronjob failing. - Also fix another check for empty ${EROOT} (broken since EAPI 7 port). Closes: https://bugs.gentoo.org/829872 Signed-off-by: Sam James gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/23534 Signed-off-by: Sam James gentoo.org> .../shadow/{shadow-4.10-r3.ebuild => shadow-4.10-r4.ebuild} | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sys-apps/shadow/shadow-4.10-r3.ebuild b/sys-apps/shadow/shadow-4.10-r4.ebuild similarity index 94% rename from sys-apps/shadow/shadow-4.10-r3.ebuild rename to sys-apps/shadow/shadow-4.10-r4.ebuild index 020224692897..3cb7d9ff4aa7 100644 --- a/sys-apps/shadow/shadow-4.10-r3.ebuild +++ b/sys-apps/shadow/shadow-4.10-r4.ebuild @@ -234,12 +234,18 @@ pkg_preinst() { } pkg_postinst() { + # Missing entries from /etc/passwd can cause odd system blips. + # See bug #829872. + if ! pwck -r -q -R "${EROOT:-/}" &>/dev/null ; then + ewarn "Running 'pwck' returned errors. Please run it manually to fix any errors." + fi + # Enable shadow groups. if [ ! -f "${EROOT}"/etc/gshadow ] ; then - if grpck -r -R "${EROOT}" 2>/dev/null ; then - grpconv -R "${EROOT}" + if grpck -r -R "${EROOT:-/}" 2>/dev/null ; then + grpconv -R "${EROOT:-/}" else - ewarn "Running 'grpck' returned errors. Please run it by hand, and then" + ewarn "Running 'grpck' returned errors. Please run it by hand, and then" ewarn "run 'grpconv' afterwards!" fi fi