From: Ulrich Drepper <drepper@redhat.com>
To: libc-hacker@sourceware.org
Subject: Re: [PATCH] Fix error handling in getlogin_r
Date: Tue, 15 Jun 2010 00:53:00 -0000 [thread overview]
Message-ID: <4C16CEE0.6010306@redhat.com> (raw)
In-Reply-To: <m31vcpslsc.fsf@hase.home>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 06/02/2010 04:42 AM, Andreas Schwab wrote:
> 2010-06-02 Andreas Schwab <schwab@redhat.com>
>
> * sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid):
> Fix error handling. Properly resize buffer. Don't set errno.
> (getlogin_r): Only use fallback if __getlogin_r_loginuid returns -1.
This patch is changing the way the code works.
The current tries to use the old method whenever the new one fails.
Particularly if the name lookup fails. Imagine the user account is
removed. After your change a call always returns an error while the
utmp database can still contain a valid record.
What are you trying to fix? Perhaps ENOMEM errors could be handled
differently but the patch as-is isn't what should be used.
- --
⧠Ulrich Drepper ⧠Red Hat, Inc. ⧠444 Castro St ⧠Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAkwWzuAACgkQ2ijCOnn/RHSgQQCeKc8C+kFACp/J2TFG/GepytmF
CIoAoK3Rbi414e4Fid/NbqJ8d1OyiJah
=JyOF
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2010-06-15 0:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-02 11:45 Andreas Schwab
2010-06-15 0:53 ` Ulrich Drepper [this message]
2010-06-15 7:49 ` Andreas Schwab
2010-06-21 9:09 ` Andreas Schwab
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=4C16CEE0.6010306@redhat.com \
--to=drepper@redhat.com \
--cc=libc-hacker@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).