From owner-freebsd-doc@FreeBSD.ORG  Thu Aug  7 06:23:11 2008
Return-Path: <owner-freebsd-doc@FreeBSD.ORG>
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 81542106566C;
	Thu,  7 Aug 2008 06:23:11 +0000 (UTC) (envelope-from ws@au.dyndns.ws)
Received: from ipmail05.adl2.internode.on.net (ipmail05.adl2.internode.on.net
	[203.16.214.145])
	by mx1.freebsd.org (Postfix) with ESMTP id C61BD8FC1A;
	Thu,  7 Aug 2008 06:23:10 +0000 (UTC) (envelope-from ws@au.dyndns.ws)
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AkQCABAsmkiWZWdv/2dsb2JhbAAIrGw
X-IronPort-AV: E=Sophos;i="4.31,319,1215354600"; d="scan'208";a="176256108"
Received: from ppp103-111.static.internode.on.net (HELO [192.168.1.157])
	([150.101.103.111])
	by ipmail05.adl2.internode.on.net with ESMTP; 07 Aug 2008 15:37:51 +0930
From: Wayne Sierke <ws@au.dyndns.ws>
To: trhodes@FreeBSD.org
In-Reply-To: <200808031632.m73GWU8H048418@freefall.freebsd.org>
References: <200808031632.m73GWU8H048418@freefall.freebsd.org>
Content-Type: text/plain
Date: Thu, 07 Aug 2008 15:37:49 +0930
Message-Id: <1218089269.4383.128.camel@predator-ii.buffyverse>
Mime-Version: 1.0
X-Mailer: Evolution 2.22.2 FreeBSD GNOME Team Port 
Content-Transfer-Encoding: 7bit
Cc: 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 <freebsd-doc.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-doc>,
	<mailto:freebsd-doc-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-doc>
List-Post: <mailto:freebsd-doc@freebsd.org>
List-Help: <mailto:freebsd-doc-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-doc>,
	<mailto:freebsd-doc-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Aug 2008 06:23:11 -0000

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?


Wayne