This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/16475] New: gethostbyaddr without /etc/{resolv,nsswitch}.conf
- From: "ludo at gnu dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 21 Jan 2014 17:30:11 +0000
- Subject: [Bug network/16475] New: gethostbyaddr without /etc/{resolv,nsswitch}.conf
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16475
Bug ID: 16475
Summary: gethostbyaddr without /etc/{resolv,nsswitch}.conf
Product: glibc
Version: 2.18
Status: NEW
Severity: normal
Priority: P2
Component: network
Assignee: unassigned at sourceware dot org
Reporter: ludo at gnu dot org
(Initially discussed at
<http://sourceware.org/ml/libc-alpha/2014-01/msg00351.html>.)
Consider an environment without /etc/resolv.conf.
When doing a host name lookup, âdnsâ returns NSS_STATUS_UNAVAIL, so we go on
with âfilesâ and /etc/hosts is honored as expected
Conversely, when doing a reverse lookup when /etc/resolv.conf is missing, the
'dns' name service returns NSS_STATUS_NOTFOUND, leading 'gethostbyaddr' to
return immediately without invoking the 'files' NSS (thus ignoring /etc/hosts.)
It seems that 'dns' should instead always return UNAVAIL when resolv.conf is
missing, but that is an ABI break.
--
You are receiving this mail because:
You are on the CC list for the bug.