🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.4bsd
Article #334

Bugginess in /etc/printcap and gethostname

#334
From: Nico Garcia
Date: Wed, 03 Apr 1991 18:37
52 lines
1714 bytes
We have a kind of strange problem with our printcap when I try to set
it to cope with another printer. When I use this entry, it fails, complaining
about not being able to find the host.

	Suzie|suzie|Gatorshare_printer:\
		:lp=:\
		:rm=GatorBox00346:\
		:rp=Suzie:\
		:sd=/usr/spool/Suzie:\
		:lf=/usr/adm/Suzie-log:

But, if I change the rm to gatorbox, as follows,

	Suzie|suzie|Gatorshare_printer:\
		:lp=:\
		:rm=gatorbox:\
		:rp=Suzie:\
		:sd=/usr/spool/Suzie:\
		:lf=/usr/adm/Suzie-log:

The entry in /etc/hosts for our gatorbox is as follows:

	192.9.200.100		GatorBox00346 gatorbox	# LocalTalk gateway

Apparently, when getting hostnames, the "gethostbyname" does a
conversion to lower case, as follows:

	[code from gethostnameadr.c]

	gethostbyname(nam)

	[...code...]
	
		while (*nam)
			if (isupper(*nam))
				*lp++ = tolower(*nam++);
			else
				*lp++ = *nam++;
		*lp = '\0';

	[...more code...]


Our system is a Vax 11/750, running mosty BSD 4.3. Can anyone explain
to me *why* the !@#$ thing does a conversion of hostnames to lower
case? Or if there is any reason I should not just comment out the
if statement (we do have a source license)?

-- 
			Nico Garcia
			Designs by Geniuses for use by Idiots
			eplunix!cirl!raoul@eddie.mit.edu
Technical Details
Message-ID: <1057@eplunix.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!think.com!eplunix!raoul

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!think.com!eplunix!raoul
From: raoul@eplunix.UUCP (Nico Garcia)
Newsgroups: comp.bugs.4bsd,comp.unix.admin,comp.unix.wizards
Subject: Bugginess in /etc/printcap and gethostname
Keywords: printcap, gethostname
Message-ID: <1057@eplunix.UUCP>
Date: 3 Apr 91 18:37:04 GMT
Organization: Eaton-Peabody Lab, Boston, MA
Lines: 52