From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 3A13C3858D3C for ; Tue, 21 Feb 2023 09:21:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3A13C3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Content-Type: multipart/signed; boundary="Apple-Mail=_F50E072C-AA84-4A68-8426-DAB45EA07BEE"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Subject: Re: [PATCH] gshadow: Matching sgetsgent, sgetsgent_r ERANGE handling (bug 30151) From: Sam James In-Reply-To: <875ybvs98d.fsf@oldenburg.str.redhat.com> Date: Tue, 21 Feb 2023 09:21:00 +0000 Cc: Libc-alpha Message-Id: References: <875ybvs98d.fsf@oldenburg.str.redhat.com> To: Florian Weimer X-Mailer: Apple Mail (2.3731.300.101.1.3) X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --Apple-Mail=_F50E072C-AA84-4A68-8426-DAB45EA07BEE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 21 Feb 2023, at 08:39, Florian Weimer via Libc-alpha = wrote: >=20 > Before this change, sgetsgent_r did not set errno to ERNAGE, but s/ERNAGE/ERANGE/ > sgetsgent only checked errno, not the return value from sgetsgent_r. > Consequently, sgetsgent did not detect any error, and reported > success to the caller, without initializing the struct sgrp object > whose address was returned. >=20 > This commit changes sgetsgent_r to set errno as well. This avoids > similar issues in applications which only change errno. >=20 > Tested on x86_64-linux-gnu. >=20 Tested on x86_64-linux-gnu too, thanks, although I couldn't reproduce = the original shadow bug which may or may not be related = (https://github.com/shadow-maint/shadow/issues/628). --Apple-Mail=_F50E072C-AA84-4A68-8426-DAB45EA07BEE Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY/SM/V8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kMW0AP4hcXnJwMM95tiiC24vNPsxSHMhQQ1UiuHBasaobAJu5QEA616/IV0qRzVE nQ4KAWKdcomQ/G2XI9HrWGNuCxnTDgk= =KvcP -----END PGP SIGNATURE----- --Apple-Mail=_F50E072C-AA84-4A68-8426-DAB45EA07BEE--