From owner-freebsd-doc@FreeBSD.ORG Thu Aug 7 08:57:54 2008 Return-Path: Delivered-To: freebsd-doc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 457C11065672 for ; Thu, 7 Aug 2008 08:57:54 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from pittgoth.com (pittgoth.com [205.134.163.206]) by mx1.freebsd.org (Postfix) with ESMTP id 00CA38FC22 for ; Thu, 7 Aug 2008 08:57:53 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from localhost.fbsdsecure.org (net-ix.gw.ai.net [205.134.160.6]) (authenticated bits=0) by pittgoth.com (8.14.2/8.14.2) with ESMTP id m778Ikgl066694 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 7 Aug 2008 04:18:46 -0400 (EDT) (envelope-from trhodes@FreeBSD.org) Date: Thu, 7 Aug 2008 04:18:39 -0400 From: Tom Rhodes To: Wayne Sierke Message-Id: <20080807041839.6ae1fe2b.trhodes@FreeBSD.org> In-Reply-To: <1218089269.4383.128.camel@predator-ii.buffyverse> References: <200808031632.m73GWU8H048418@freefall.freebsd.org> <1218089269.4383.128.camel@predator-ii.buffyverse> X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: trhodes@FreeBSD.org, freebsd-doc@FreeBSD.org Subject: Re: docs/124949: Discrepancy between handbook and example hosts file for localhost configuration X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2008 08:57:54 -0000 On Thu, 07 Aug 2008 15:37:49 +0930 Wayne Sierke wrote: > On Sun, 2008-08-03 at 16:32 +0000, trhodes@FreeBSD.org wrote: > > Synopsis: Discrepancy between handbook and example hosts file for localhost configuration > > > > State-Changed-From-To: open->closed > > State-Changed-By: trhodes > > State-Changed-When: Sun Aug 3 16:31:00 UTC 2008 > > State-Changed-Why: > > I have updated the example in the handbook, thanks for > > bringing this to our attention. > > In fact I had hoped to elicit some discussion about whether the default > localhost configuration should include the hostname or not. > > As mentioned in the original PR I noticed the $SUBJECT while > investigating a "slow SSH login" issue. > > Looking at the CVS history for /src/etc/hosts seems to show that the > addition (and removal) of hostname to localhost has been through a > couple of iterations (starting Nov'95): > > Revision 1.11.2.2: > Mon Oct 8 09:32:08 2001 UTC (6 years, 9 months ago) by ru > Branches: RELENG_4 > > MFC: 1.14: removed `myname.my.domain' as another alias for `localhost'. > > > Revision 1.14: > Sat Sep 29 12:20:08 2001 UTC (6 years, 10 months ago) by ru > Branches: MAIN > > Backout revision 1.9 that added `myname.my.domain' as another alias for > `localhost'. If your /etc/nsswitch.conf has ``hosts: files dns'', and > you changed `myname.my.domain' in /etc/hosts to match hostname(1), and > you run inetd(8) with the -l option, any connect to `myname' using its > real IP address through inetd(8), e.g. `ftp -a myname', will spam your > /var/log/messages with: > > inetd[PID]: warning: /etc/hosts.allow, line 23: host name/name mismatch: myname.my.domain != localhost > > This is especially bad for -STABLE, where /etc/host.conf defaults to > "files first then DNS" resolution order. > > > Revision 1.9: > Thu Apr 16 14:37:19 1998 UTC (10 years, 3 months ago) by joerg > Branches: MAIN > > Add `myname.my.domain' as another alias for `localhost'. We set this > as the initial generic hostname if the user didn't setup any NIC, but > failure to resolve this name results in XF86Setup not being able to > run. > > > Revision 1.5.4.1: > Sun Nov 19 17:53:28 1995 UTC (12 years, 8 months ago) by jkh > Branches: RELENG_2_1_0 > > Put myname.my.domain by default on the loopback, resulting in less confusing > startup behavior for newly installed hosts not on a network. > > > Google will also pull up suggestions to add hostname to the localhost > config to solve various networking-related "issues". > > I guess the upshot of all this is to consider whether it might be useful > to add some text to the handbook discussing when adding (and removing) > hostname to/from the localhost config might be prudent/needed? I'll be out of town on vacation from 08-07 - 08-13. If you have some wording in mind, please suggest. Otherwise, I'll look more into this when I get back. Thanks, -- Tom Rhodes