From: Sam James <sam@gentoo.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH] gshadow: Matching sgetsgent, sgetsgent_r ERANGE handling (bug 30151)
Date: Tue, 21 Feb 2023 09:21:00 +0000 [thread overview]
Message-ID: <AA6CD753-D089-4C66-8209-11EA13C77C84@gentoo.org> (raw)
In-Reply-To: <875ybvs98d.fsf@oldenburg.str.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 788 bytes --]
> On 21 Feb 2023, at 08:39, Florian Weimer via Libc-alpha <libc-alpha@sourceware.org> wrote:
>
> 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.
>
> This commit changes sgetsgent_r to set errno as well. This avoids
> similar issues in applications which only change errno.
>
> Tested on x86_64-linux-gnu.
>
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).
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]
next prev parent reply other threads:[~2023-02-21 9:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 8:39 Florian Weimer
2023-02-21 9:21 ` Sam James [this message]
2023-02-21 9:45 ` Florian Weimer
2023-03-01 18:20 ` Siddhesh Poyarekar
2023-03-07 9:06 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AA6CD753-D089-4C66-8209-11EA13C77C84@gentoo.org \
--to=sam@gentoo.org \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).