From: Siddhesh Poyarekar <siddhesh@gotplt.org>
To: Florian Weimer <fweimer@redhat.com>, Andreas Schwab <schwab@suse.de>
Cc: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH] nscd: Do not rebuild getaddrinfo (bug 30709)
Date: Thu, 10 Aug 2023 14:07:00 -0400 [thread overview]
Message-ID: <028390b6-44ab-aa33-4750-3749fb9d82f8@gotplt.org> (raw)
In-Reply-To: <873511sekj.fsf@oldenburg.str.redhat.com>
On 2023-08-02 10:29, Florian Weimer via Libc-alpha wrote:
> So do I. The Git history isn't very illuminating. The layering
> wouldn't work anyway because of the ai_flags processing. I was
> wondering whether the __check_pf stuff was supposed to be overriding
> something, but I don't see this either (not even in the history).
Apparently there was a getaddrinfo stub in nscd/nscd.c to make sure that
nscd never called getaddrinfo, potentially resulting in nscd talking to
itself:
"""
/* This is an ugly hack which prevents getaddrinfo from being dragged
into nscd. There currently is no special getaddrinfo version for
use in nscd. In case it should be necessary such a version must be
created and this dummy version should be removed. */
extern void getaddrinfo (void) __attribute ((visibility ("hidden")));
void
getaddrinfo (void)
{
abort ();
}
"""
which later got replaced by nscd/gai.c:
commit 3078cba2f7272dab753c45b733af2e693e86d83c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 4 16:35:54 2004 +0000
Update.
* nscd/connections.c (start_threads): Use sysconf in case
_POSIX_CLOCK_SELECTION or _POSIX_MONOTONIC_CLOCK is not
greater zero.
* nscd/nscd.c: Remove getaddrinfo stub definition.
commit 91a3b2ad2e819a7fa14b8f9773856e4303a8c99a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 4 09:36:51 2004 +0000
Update.
* nscd/Makefile (nscd-modules): Add gai.
* nscd/gai.c: New file.
but there's no indication as to why, because it doesn't look like
getaddrinfo was actually needed at that time either. In all I think
this looks correct. If we want nscd to be safe from the possibility
that it ends up talking to itself accidentally at some point, we could
add back the aborting stub.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
prev parent reply other threads:[~2023-08-10 18:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-01 14:13 Florian Weimer
2023-08-02 13:16 ` Andreas Schwab
2023-08-02 13:20 ` Florian Weimer
2023-08-02 13:41 ` Andreas Schwab
2023-08-02 14:29 ` Florian Weimer
2023-08-10 18:07 ` Siddhesh Poyarekar [this message]
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=028390b6-44ab-aa33-4750-3749fb9d82f8@gotplt.org \
--to=siddhesh@gotplt.org \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=schwab@suse.de \
/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).