[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#157693: marked as done (resolver: getaddrinfo misses fields in /etc/hosts)



Your message dated Mon, 11 Jul 2005 14:43:19 -0400 (EDT)
with message-id <Pine.BSO.4.58.0507111434560.19039@grex.cyberspace.org>
and subject line too old and merged
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 20 Aug 2002 22:26:14 +0000
>From dilinger@voxel.net Tue Aug 20 17:26:14 2002
Return-path: <dilinger@voxel.net>
Received: from (chunk.voxel.net) [207.99.115.133] (postfix)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 17hHS2-0002hu-00; Tue, 20 Aug 2002 17:26:14 -0500
Received: by chunk.voxel.net (Postfix, from userid 1000)
	id 25A892E9A0; Tue, 20 Aug 2002 18:26:10 -0400 (EDT)
Date: Tue, 20 Aug 2002 18:26:10 -0400
From: Andres Salomon <dilinger@voxel.net>
To: submit@bugs.debian.org
Subject: getaddrinfo() is buggy; resolution misses fields in /etc/hosts
Message-ID: <20020820222609.GA5214@chunk.voxel.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.28i
X-Operating-System: Linux chunk 2.4.18-ac3 
Delivered-To: submit@bugs.debian.org

Package: libc6
Version: 2.2.5-11.1
Severity: important

(note: making the severity important 'cause this is a particularly
annoying bug, that should _not_ be in a "stable" debian release).

Several people have complained that things using getaddrinfo() (telnet,
apt, curl, links, and many others) ignore the order in
/etc/nsswitch.conf, passing over hosts in /etc/hosts and instead doing a
dns lookup via nameservers.  I have traced through glibc, and discovered
that gaih_inet() appends a "." to the host when doing a lookup.  Adding
the trailing dot to entries in /etc/hosts makes lookups work properly
again.  What I believe is happening is:

/etc/hosts is searched for foo.bar.com. (note the trailing dot);
if not found, the resolver searches for foo.bar.com.;
if not found, /etc/hosts is searched for foo.bar.com (not the lack of
trailing dot);
if not found, the resolver searches for foo.bar.com (appending the
search domain from /etc/resolv.conf if there is one..
foo.bar.com.tld.com, for example).

This is inconsistent behavior, as /etc/hosts has no notion of search
paths for domains; all aliases are usually listed after the ip (ie,
192.168.0.1 gateway.foo.com gateway gw gw.foo.com cerebus.foo.com).

Please let me know if I'm incorrect; glibc dns resolution code is
horrible to try and understand..

-- 
Broad surveillance is a mark of bad security.
	-- Bruce Schneier

---------------------------------------
Received: (at 109931-done) by bugs.debian.org; 11 Jul 2005 18:40:29 +0000
>From dajo@cyberspace.org Mon Jul 11 11:40:29 2005
Return-path: <dajo@cyberspace.org>
Received: from grex.cyberspace.org [216.86.77.194] (exim)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Ds3Cf-0004Ww-00; Mon, 11 Jul 2005 11:40:29 -0700
Received: from dajo (helo=localhost)
	by grex.cyberspace.org with local-esmtp (Exim 4.42)
	id 1Ds3FP-0000YK-6i; Mon, 11 Jul 2005 14:43:19 -0400
Date: Mon, 11 Jul 2005 14:43:19 -0400 (EDT)
From: Daniel Jonan <dajo@grex.cyberspace.org>
To: 26306-done@bugs.debian.org, 6798-done@bugs.debian.org, 
    159781-done@bugs.debian.org, 109931-done@bugs.debian.org
cc: 76251-done@bugs.debian.org, 89323-done@bugs.debian.org, 
    11147-done@bugs.debian.org
Subject: too old and merged
Message-ID: <Pine.BSO.4.58.0507111434560.19039@grex.cyberspace.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: Daniel Jonan <dajo@cyberspace.org>
Delivered-To: 109931-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

closing



Reply to: