Bug 61121 - gethostbyname() is not checking /etc/host.conf and /etc/hosts files anymore
Summary: gethostbyname() is not checking /etc/host.conf and /etc/hosts files anymore
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bind
Version: 7.2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-03-13 21:56 UTC by Need Real Name
Modified: 2007-04-18 16:40 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-05-01 12:52:27 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2002-03-13 21:56:05 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Description of problem:
If i strace host, nslookup or any other tools, they do not even 
open /etc/host.conf to check the order, though I can find /etc/host.conf when 
i 'string' libs files.
Bug?

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. /etc/host.conf: order hosts,bind
2. /etc/hosts: 1.1.1.1   asdfgdf   asdfgdf.net
3. root@host> host asdfgdf
Host asdfgdf. not found: 3(NXDOMAIN) 

	

Expected Results:  Well :) Selfexplanatory, but I expected it to resolv 
my /etc/hosts entry.

Additional info:

Comment 1 Brian Smith 2002-09-24 16:15:46 UTC
I am experiencing this problem also.
strace on nslookup shows no references to hosts file.
This makes it difficult to perform any local testing.
Please increase priority.

Comment 2 Ulrich Drepper 2003-04-24 04:12:26 UTC
This has nothing to do with glibc.  nslookup and host both don't use the lookup
mechanism glibc provides (NSS).  That's the whole point, both tools directly
talk to DNS servers and only DNS servers.

If you want to see glibc's mechanism in action use getent:

$ getent hosts asdfgdf
1.1.1.1         asdfgdf asdfgdf.net

I'm reassigning to bind just in case they want to add something.  But I think
neither host nor nslookup are supposed to look at hist.conf and definitely not
at /etc/hosts.


Note You need to log in before you can comment on or make changes to this bug.