🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Nico Garcia Wed, 03 Apr 1991 18:37
Bugginess in /etc/printcap and gethostname
#334
Author: 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
Re: Bugginess in /etc/printcap and gethostname
#339
Author: Clyde W. Hoover
Date: Thu, 04 Apr 1991 22:13
22 lines
1515 bytes
In article <1057@eplunix.UUCP>, raoul@eplunix.UUCP (Nico Garcia) writes:

|> Apparently, when getting hostnames, the "gethostbyname" does a
|> conversion to lower case ( ... )

|> 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)?

Because Internet host names are case insensitive, as per some RFC.
There may be a bug in gethostnameadr.c in that data from the host file
should be treated the same as the hostname argument (i.e. forced to 
lower case).

Change "GatorBox00346" to "gatorbox00346" in hosts and printcap or fix the
comparasion in gethostnameadr.c to be truly case-insensitive.

Clyde Hoover (Shouter-To-Dead-Parrots)	|
UNIX/VMS Services			| "Forward my mail to the corner
Compuatation Center, UT Austin 		|  of Pork and Beans"
clyde@emx.utexas.edu			|
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads