Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Aug 2008 15:37:49 +0930
From:      Wayne Sierke <ws@au.dyndns.ws>
To:        trhodes@FreeBSD.org
Cc:        freebsd-doc@FreeBSD.org
Subject:   Re: docs/124949: Discrepancy between handbook and example hosts file for localhost configuration
Message-ID:  <1218089269.4383.128.camel@predator-ii.buffyverse>
In-Reply-To: <200808031632.m73GWU8H048418@freefall.freebsd.org>
References:  <200808031632.m73GWU8H048418@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1218089269.4383.128.camel>