Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

user/3333:

From: <rperkins(at)tcsg.net>
Date: Wed Jun 25 2003 - 01:05:56 EDT


>Number: 3333
>Category: user
>Synopsis:
>Confidential: no
net
>Environment:

	System      : OpenBSD 3.2
	Architecture: OpenBSD.i386
	Machine     : i386

>Description:
In revision 1.28 for /src/usr.bin/telnet/commands.c, the following changes were made: If getaddrinfo() fails: o Only call herror() if h_errno != 0 o if error == EAI_SERVICE say "bad port" since the generic error, "service not supported for ai_socktype" is incomprehensible to most users. o Use warnx(), not warn() since this is not a case where errno is likely to be relevant. Ok'd by Theo Could similar changes be made for "error == EAI_SERVICE" be made to /src/usr.bin/whois/whois.c and possibly other places where this error might arise.

>How-To-Repeat:
        

>Fix:

	# diff -u whois/whois.c.orig whois/whois.c
	--- whois/whois.c.orig  Wed Jan 15 18:16:29 2003
	+++ whois/whois.c       Wed Jun 25 00:53:43 2003
	@@ -180,6 +180,9 @@
		hints.ai_socktype = SOCK_STREAM;
		error = getaddrinfo(server, port, &hints, &res);
		if (error) {
	+	    if (error == EAI_SERVICE)
	+		warnx("%s: bad port", port);
	+	    else
 			warnx("%s: %s", server, gai_strerror(error));
 			return (1);
		}

>Release-Note:
Received on Wed Jun 25 01:38:31 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:59 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library