Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Apr 2009 01:27:02 +0900
From:      Hajimu UMEMOTO <ume@FreeBSD.org>
To:        Wesley Shields <wxs@FreeBSD.org>
Cc:        cvs-ports@FreeBSD.org, Daniel Roethlisberger <daniel@roe.ch>, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org
Subject:   Re: cvs commit: ports/security/nmap Makefile ports/security/nmap/files patch-ncat__ncat_core.c
Message-ID:  <ygeskk26kh5.wl%ume@mahoroba.org>
In-Reply-To: <200904211536.n3LFauSD031415@repoman.freebsd.org>
References:  <200904211536.n3LFauSD031415@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Multipart_Wed_Apr_22_01:27:01_2009-1
Content-Type: text/plain; charset=US-ASCII

Hi,

>>>>> On Tue, 21 Apr 2009 15:36:56 +0000 (UTC)
>>>>> Wesley Shields <wxs@FreeBSD.org> said:

wxs>   Modified files:
wxs>     security/nmap        Makefile Z
wxs>   Added files:
wxs>     security/nmap/files  patch-ncat__ncat_core.c 
wxs>   Log:
wxs>   - Add patch to work around versions of FreeBSD with broken
wxs>     getaddrinfo(3) (7.1 and earlier, and -CURRENT before the end of March
wxs>     2009).
wxs>   
wxs>   PR:             ports/133779
wxs>   Submitted by:   Daniel Roethlisberger <daniel@roe.ch> (maintainer)

It seems this change is not good practice.  The original usage of
getadrinfo(3) is not good, in the first place.
You can fix this by just adding ai_socktype hint.  The replacement of
patch-ncat__ncat_core.c is attached.
Sorry, but I don't test it, actually.  But, it should work.  Please,
try it.

Sincerely,

--Multipart_Wed_Apr_22_01:27:01_2009-1
Content-Type: text/x-patch; charset=US-ASCII
Content-Disposition: attachment; filename="patch-ncat__ncat_core.c"
Content-Transfer-Encoding: 7bit

Index: ncat/ncat_core.c
diff -u -p ncat/ncat_core.c.orig ncat/ncat_core.c
--- ncat/ncat_core.c.orig	2009-04-02 11:57:42.000000000 +0900
+++ ncat/ncat_core.c	2009-04-22 00:58:48.839927966 +0900
@@ -89,6 +89,7 @@ int resolve(char *hostname, unsigned sho
 
   memset(&hints, 0, sizeof(hints));
   hints.ai_family = o.af;
+  hints.ai_socktype = SOCK_DGRAM;
   if (o.nodns)
      hints.ai_flags |= AI_NUMERICHOST;
 

--Multipart_Wed_Apr_22_01:27:01_2009-1
Content-Type: text/plain; charset=US-ASCII


--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/

--Multipart_Wed_Apr_22_01:27:01_2009-1--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ygeskk26kh5.wl%ume>