This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] deprecate libnsl/libnss_*
- From: Pedro Alves <palves at redhat dot com>
- To: Roland McGrath <roland at hack dot frob dot com>, Joseph Myers <joseph at codesourcery dot com>
- Cc: Florian Weimer <fweimer at redhat dot com>, Thorsten Kukuk <kukuk at suse dot de>, libc-alpha at sourceware dot org
- Date: Fri, 8 Apr 2016 20:49:54 +0100
- Subject: Re: [PATCH] deprecate libnsl/libnss_*
- Authentication-results: sourceware.org; auth=none
- References: <20160404134356 dot GA20216 at suse dot de> <5702780D dot 7070208 at redhat dot com> <20160404142237 dot GA20583 at suse dot de> <57062C77 dot 1080103 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1604071516070 dot 26336 at digraph dot polyomino dot org dot uk> <20160408183921 dot 4FAAF2C3B21 at topped-with-meat dot com>
On 04/08/2016 07:39 PM, Roland McGrath wrote:
>> If it's visible to an application what libraries were loaded by an NSS
>> module, I'd consider that to be a bug (bug 16881, I think) - NSS modules
>> should be loaded in such a way that this is not visible.
>
> Bug 16881 is not entirely clear on what it's talking about. On the face of
> it, it sounds like a problem that could only arise if something were using
> RTLD_GLOBAL. If that's all it's talking about, then that should already
> not be an issue.
gdb has a timeval_add symbol, and none of the direct dependencies
of gdb define a conflicting symbol. However, gdb calls gethostbyname,
and that, due to some internal implementation detail of glibc,
dynamically loads a module which does have a global symbol of the
same name, which ended up unintentionally overridden by gdb's symbol.
The bug was about seeing if it'd be possible for internal
details of the implementation, and here I'm calling implementation/libnss
loaded modules as such, not to cause namespace pollution in symbols
not in the implementation namespace, nor reserved by the
relevant standards, vs applications having to avoid the issue
themselves, by renaming their symbols.
AFAICS, gdb has not renamed the symbol, and I'm not the one
who tripped on it in the first place, so I'm not sure
whether this particular instance of the bug was fixed some
other way.
Let me know whether it's still not clear.
--
Pedro Alves