From jdp@polstra.com  Fri Jul 14 11:34:48 1995
Received: from freebie.polstra.com (freebie.polstra.com [198.211.214.7])
          by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id LAA22213
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 14 Jul 1995 11:34:45 -0700
Received: (from jdp@localhost) by freebie.polstra.com (8.6.11/8.6.9) id LAA07539; Fri, 14 Jul 1995 11:07:25 -0700
Message-Id: <199507141807.LAA07539@freebie.polstra.com>
Date: Fri, 14 Jul 1995 11:07:25 -0700
From: John Polstra <jdp@polstra.com>
Reply-To: jdp@polstra.com
To: FreeBSD-gnats-submit@freebsd.org
Cc: jdp@polstra.com
Subject: Default /etc/hosts.equiv causes rsh/rlogin hangups
X-Send-Pr-Version: 3.2

>Number:         620
>Category:       conf
>Synopsis:       Default /etc/hosts.equiv causes rsh/rlogin hangups
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs (FreeBSD bugs mailing list)
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 14 11:40:01 1995
>Closed-Date:    Sun Jul 16 12:12:43 MET DST 1995
>Last-Modified:
>Originator:     John Polstra
>Release:        FreeBSD 2.0-BUILT-19950603 i386
>Organization:
Polstra & Co., Inc.
>Environment:

	Stock 2.0.5-RELEASE installation

>Description:

	The default version of "/etc/hosts.equiv" that is created during
	system installation is invalid.  It contains "comments" which
	begin with "#".  But such comments are not allowed in this file.
	The "comment" lines are treated as host names.  Attempts to
	resolve these invalid host names through DNS result in very long
	delays.  The user sees these long delays when he tries to run
	"rsh" or "rlogin" to the FreeBSD system.

	Whether the delays actually occur or not seems to depend on the
	behavior of the name server that is being used to process DNS
	queries.  Sometimes the delays occur, and sometimes they do not.

	I *know* this is a problem, because I have observed the DNS
	queries for the bogus host names using an ethernet sniffer.  And
	I have watched the timeouts occur as the name server failed to
	respond to the bogus queries.  Furthermore, when I repaired the
	broken "/etc/hosts.equiv" file, the delays went away.

>How-To-Repeat:

	1.  Use the default version of "/etc/hosts.equiv".
	2.  Specify a different machine as the name server in
	    "/etc/resolv.conf".
	3.  Try to execute a command on the FreeBSD machine from a
	    different machine, using "rsh".
	4.  You *may or may not* observe long delays.  The problem seems
	    to depend on the state of the name server.

>Fix:
	
	Work-around:  Eliminate comments and blank lines from
	"/etc/hosts.equiv".

	Simple fix:  In the next release of the system, make sure there
	are no comments or blank lines in the default version of
	"/etc/hosts.equiv" that is created during system installation.
	I suggest either (a) not installing this file at all, or (b)
	installing an empty version of the file, or (c) installing a
	one-line version of the file, containing only "localhost".

	Better fix:  Add code to __ivaliduser() in
	"/usr/src/lib/libc/net/rcmd.c" to make it ignore comment lines
	and blank lines.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: joerg 
State-Changed-When: Sun Jul 16 12:12:43 MET DST 1995 
State-Changed-Why:  
ruserok() now fixed to accept comments starting in column 1, fix 
appeared in 

/home/ncvs/src/lib/libc/net/rcmd.c,v  <--  rcmd.c 
new revision: 1.4; previous revision: 1.3 

>Unformatted:



