public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/1912] New: gethostbyname2()/getaddrinfo() skips /etc/hosts with --enable-static-nss
@ 2005-11-22 23:00 djohnson+sourceware at sw dot starentnetworks dot com
2005-11-25 16:42 ` [Bug libc/1912] " drepper at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: djohnson+sourceware at sw dot starentnetworks dot com @ 2005-11-22 23:00 UTC (permalink / raw)
To: glibc-bugs
When built with --enable-static-nss, gethostbyname2() and functions that call
it like getaddrinfo() will only do dns lookups and not try /etc/hosts like
gethostbyname() will.
__nss_lookup_function() for gethostbyname2() will try _nss_dns_gethostbyname2_r,
but not _nss_files_gethostbyname2_r.
I'm using an old 2.2.x version, but it appears missing in the code for 2.3.5 as
well.
Below patch will fix the problem:
--- old/nss/function.def 2002-02-21 16:57:50 -05:00
+++ new/nss/function.def 2005-11-22 15:40:48 -05:00
@@ -37,6 +37,7 @@
DEFINE_ENT (files, host)
DEFINE_GETBY (files, host, addr)
DEFINE_GETBY (files, host, name)
+DEFINE_GETBY (files, host, name2)
DEFINE_GET (files, hostton)
DEFINE_GET (files, ntohost)
DEFINE_GETBY (dns, host, addr)
--
Summary: gethostbyname2()/getaddrinfo() skips /etc/hosts with --
enable-static-nss
Product: glibc
Version: 2.2.5
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: djohnson+sourceware at sw dot starentnetworks dot com
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: mips-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=1912
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libc/1912] gethostbyname2()/getaddrinfo() skips /etc/hosts with --enable-static-nss
2005-11-22 23:00 [Bug libc/1912] New: gethostbyname2()/getaddrinfo() skips /etc/hosts with --enable-static-nss djohnson+sourceware at sw dot starentnetworks dot com
@ 2005-11-25 16:42 ` drepper at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: drepper at redhat dot com @ 2005-11-25 16:42 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2005-11-25 16:42 -------
Although it should not matter since static NSS is only meant for initial porting
I added the change.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=1912
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-25 16:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-22 23:00 [Bug libc/1912] New: gethostbyname2()/getaddrinfo() skips /etc/hosts with --enable-static-nss djohnson+sourceware at sw dot starentnetworks dot com
2005-11-25 16:42 ` [Bug libc/1912] " drepper at redhat dot com
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).