From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CF075158128 for ; Tue, 17 Jun 2025 03:01:02 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id BAB6834266E for ; Tue, 17 Jun 2025 03:01:02 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 702701104F6; Tue, 17 Jun 2025 03:00:52 +0000 (UTC) Received: from smtp.gentoo.org (dev.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) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 663C31104F6 for ; Tue, 17 Jun 2025 03:00:52 +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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 24557342681 for ; Tue, 17 Jun 2025 03:00:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 55EE129E7 for ; Tue, 17 Jun 2025 03:00:49 +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: <1750129239.68aaf1bdd20dbab2a2f088490cbde0a94d1a5bf2.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/emerge-webrsync X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 68aaf1bdd20dbab2a2f088490cbde0a94d1a5bf2 X-VCS-Branch: master Date: Tue, 17 Jun 2025 03:00:49 +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: 8fb94a2b-17c2-4172-b43a-8b8ebf7c96d5 X-Archives-Hash: fd3c8f18b0a4c8480341a281e163abe8 commit: 68aaf1bdd20dbab2a2f088490cbde0a94d1a5bf2 Author: Kerin Millar plushkava net> AuthorDate: Mon Jun 16 11:52:11 2025 +0000 Commit: Sam James gentoo org> CommitDate: Tue Jun 17 03:00:39 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=68aaf1bd emerge-webrsync: check whether gpg(1) succeeds in check_file_signature_gpg_unwrapped() Presently, the check_file_signature_gpg_unwrapped() function will create an ephemeral keyring in the case that the 'PORTAGE_GPG_DIR' variable is unset or empty. It then proceeds to import Gentoo's public key block from "gentoo-release.asc". However, it does not check the exit status of gpg(1) afterwards. Rectify this defect. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/emerge-webrsync | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync index b64f71d6d4..f32336f05d 100755 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@ -305,9 +305,9 @@ check_file_signature_gpg_unwrapped() { # empty. Create a temporary directory to contain an # ephemeral keyring into which Gentoo's distributed # public key block shall be imported. - gpgdir=$(mktemp -d -- "${PORTAGE_TMPDIR}/portage/webrsync.XXXXXX") || exit - - gpg --no-default-keyring --homedir "${gpgdir}" --batch --import "${key}" + gpgdir=$(mktemp -d -- "${PORTAGE_TMPDIR}/portage/webrsync.XXXXXX") \ + && gpg --no-default-keyring --homedir "${gpgdir}" --batch --import "${key}" \ + || exit elif [[ ! -w ${gpgdir} ]] ; then die "gpgdir is not writable: ${gpgdir}" fi