From nobody@FreeBSD.ORG Sun May 30 16:54:07 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 90E7B14C88; Sun, 30 May 1999 16:53:53 -0700 (PDT)
Message-Id: <19990530235353.90E7B14C88@hub.freebsd.org>
Date: Sun, 30 May 1999 16:53:53 -0700 (PDT)
From: icbmx2@yahoo.com
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: /etc/hosts.allow confuses tcp wrapper
X-Send-Pr-Version: www-1.0

>Number:         11950
>Category:       conf
>Synopsis:       /etc/hosts.allow confuses tcp wrapper
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sheldonh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 30 17:00:01 PDT 1999
>Closed-Date:    Wed Aug 11 14:27:10 PDT 1999
>Last-Modified:  Wed Aug 11 14:29:55 PDT 1999
>Originator:     Icbm Root
>Release:        3.2-RELEASE
>Organization:
>Environment:
FreeBSD proton 3.2-RELEASE FreeBSD 3.2-RELEASE #4: Sat May 29 16:43:
36 EDT 1999     root@proton:/usr/src/sys/compile/PROTONKERNEL  i386
>Description:
Have tcpwrap 7.6 installed on 3.2-R.

When I have both /etc/hosts.allow and /usr/local/etc/hosts.allow, tcp wrap gets confused.
Also when /etc/hosts.allow is a symlink to the local one. Or the other way around (local a symlink to /etc one).

>How-To-Repeat:

>Fix:
Put hosts.allow in /usr/local/etc only. Delete the one in /etc/hosts.allow.

>Release-Note:
>Audit-Trail:

From: Matthew Hunt <mph@astro.caltech.edu>
To: icbmx2@yahoo.com
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: conf/11950: /etc/hosts.allow confuses tcp wrapper
Date: Sun, 30 May 1999 17:08:14 -0700

 On Sun, May 30, 1999 at 04:53:53PM -0700, icbmx2@yahoo.com wrote:
 
 > >Fix:
 > Put hosts.allow in /usr/local/etc only. Delete the one in /etc/hosts.allow.
 
 How did /etc/hosts.allow get there in the first place?
 
 In what way does tcpd become confused by /etc/hosts.allow?
 
 -- 
 Matthew Hunt <mph@astro.caltech.edu> * Stay close to the Vorlon.
 http://www.pobox.com/~mph/           *
 

From: Matthew Hunt <mph@astro.caltech.edu>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: [icbmx2@yahoo.com: Re: conf/11950: /etc/hosts.allow confuses tcp wrapper]
Date: Sun, 30 May 1999 17:22:24 -0700

 ----- Forwarded message from An <icbmx2@yahoo.com> -----
 
 Date: Sun, 30 May 1999 17:18:53 -0700 (PDT)
 From: An <icbmx2@yahoo.com>
 Reply-To: icbmx2@yahoo.com
 Subject: Re: conf/11950: /etc/hosts.allow confuses tcp wrapper
 To: Matthew Hunt <mph@phobos.caltech.edu>
 
 Hi,
 
 I don't remember how /etc/hosts.allow got to /etc. I
 am not sure if it was installed with 3.2-R. If not,
 then I  edited one there (some man pages still point
 to /etc/hosts.allow).
 
 What happens when you have the file in /etc, is that
 tcpd doesn't correctly interpret the rules. For
 example, having the line:
 
 telnetd: ALL: allow 
 
 is not honored. What's more, variables like %a don't
 get correctly replaced. Delete /etc/hosts.allow and
 only have /usr/local/etc/hosts.allow and everything is
 ok.
 
 Also tcpdchk doesn't detect
 /usr/local/etc/hosts.allow. It appears to read from
 /etc/hosts.allow, and interprets the fields wrong (it
 doesn't follow the extended format???).
 
 ----- End forwarded message -----
 

From: Seth <seth@freebie.dp.ny.frb.org>
To: freebsd-gnats-submit@freebsd.org, icbmx2@yahoo.com,
	mph@astro.caltech.edu
Cc:  
Subject: Re: conf/11950: /etc/hosts.allow confuses tcp wrapper
Date: Tue, 03 Aug 1999 16:49:46 -0400 (EDT)

 Please see bin/12819 for resolution and addition to ERRATA.TXT.  I
 believe this was a problem introduced sometime in March with the
 introduction of tcpd userland utilities in /sbin.
 
 Of course, they might not be related, but I think they are....
 
 SB
 
 
State-Changed-From-To: open->feedback 
State-Changed-By: sheldonh 
State-Changed-When: Tue Aug 10 13:51:19 PDT 1999 
State-Changed-Why:  
Could you give a How-To-Repeat for "interprets the fields wrong 
(it doesn't follow the extended format???)" ? As Seth has pointed out, 
part of the problem has definitely been addressed on another PR, 
but this bit about broken parsing is new to me. 


Responsible-Changed-From-To: freebsd-bugs->sheldonh 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Tue Aug 10 13:51:19 PDT 1999 
Responsible-Changed-Why:  
I'll take this from here. 
State-Changed-From-To: feedback->closed 
State-Changed-By: sheldonh 
State-Changed-When: Wed Aug 11 14:27:10 PDT 1999 
State-Changed-Why:  
Originator can't remember what the problem was with syntax handling 
and isn't in a position to reproduce the problem. Closed with 
his consent. 
>Unformatted:
