Bugginess in /etc/printcap and gethostname

Nico Garcia raoul at eplunix.UUCP
Thu Apr 4 04:37:04 AEST 1991


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 at eddie.mit.edu



More information about the Comp.unix.wizards mailing list