[comp.bugs.4bsd] rlogind/named interaction?

sms@wlv.imsd.contel.com (Steven M. Schultz) (03/07/90)

	Are the names returned from gethostbyaddr() using the
	resolver routines and 'named' supposed to be fully
	qualified domain names?  If not, why not?

	If so, then what is the correct fix to a problem i am currently 
	seeing in 'rlogind' (4.3BSD, Vax-8650)?  The version of 
	'rlogind' is 5.22.1.7 dated 9/11/89, and the problem is in
	the "verification" process 'rlogind' performs to make sure
	the remote host is really himself.

	'Rlogind' does a gethostbyaddr() to look up the name of the
	client host, receives a successfull response, and then
	performs a gethostbyname() using the name returned earlier.

	Unfortunately, there is not a trailing '.' at the end of
	the name returned by gethostbyaddr() and RES_DNSRCH is ON (by
	default), so the resolving routines merrily start appending the 
	various domain subcomponents and issuing queries to the 'named'.
	In turn, 'named' ends up wandering out to the root servers before
	the domain search path is empty and a query on the ORIGINAL
	name is done (query ends up back in the local domain finally), at
	which point the 'rlogin' completes.  On relatively lightly loaded
	8650 a 'rlogin' has taken up to 2 minutes to complete.  A debug
	run of 'named' showed him going outside himself for local hosts
	because of the RES_DNSRCH action.

	Is the correct fix to append a '.' to the name returned by
	gethostbyaddr()?  Or is it preferable to turn off RES_DNSRCH
	before performing the gethostbyname()?  Or should the resolver
	routines check the domain part of a name to see if it already
	matches the local domain?

	Steven M. Schultz
	sms@wlv.imsd.contel.com