[1051] in Athena Bugs

home help back first fref pref prev next nref lref last post

libhesiod.a, all versions

daemon@ATHENA.MIT.EDU (Mark W. Eichin)
Sun Sep 25 20:00:38 1988

Date: Sun, 25 Sep 88 19:59:08 EDT
From: Mark W. Eichin <eichin@ATHENA.MIT.EDU>
To: Bitrot Central <bugs@ATHENA.MIT.EDU>
System type, version:	(VS2) Version 6.0C
System name:		binkley
What's wrong:

hes_getservbyname fails to convert the service name to network byte
order. Thus, it is useless on the VAX (although the RT is unaffected.)

Code example:
/paris/source/4.3/athena.lib/hesiod/hes_getservent.c (line 56):
		p->s_name = servicename;
		p->s_port = atoi(port);
		p->s_proto = protoname;
		p->s_aliases = aliases;

/paris/source/vax/lib/libc/net/getservent.c (line 75):
	serv.s_port = htons((u_short)atoi(p));
	serv.s_proto = cp;


What should have happened:

The libhesiod version should behave the same way the libc one does.
>		p->s_port = atoi(port);
<		p->s_port = htons((u_short)atoi(port));
would be an appropriate change to the hesiod library. Presumeably no
software in the field uses this now.

Note that this forces an /etc/services release for any new network
software (like get_message).

				Mark Eichin
			<eichin@athena.mit.edu>
		SIPB Member & Project Athena ``Watchmaker'' 



home help back first fref pref prev next nref lref last post