diff options
author | Wesley Shields <wxs@FreeBSD.org> | 2009-04-21 15:36:56 +0000 |
---|---|---|
committer | Wesley Shields <wxs@FreeBSD.org> | 2009-04-21 15:36:56 +0000 |
commit | 5098fed9c7f5203dcccc45cb60da81dd2463d58c (patch) | |
tree | 2d3897384e4508d46105f84e9e0ad774bc5c0059 /security | |
parent | e4cfacfa55d50bef94253bbd49aa8b4f825416e4 (diff) | |
download | ports-5098fed9c7f5203dcccc45cb60da81dd2463d58c.tar.gz ports-5098fed9c7f5203dcccc45cb60da81dd2463d58c.zip |
Notes
Diffstat (limited to 'security')
-rw-r--r-- | security/nmap/Makefile | 1 | ||||
-rw-r--r-- | security/nmap/files/patch-ncat__ncat_core.c | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/security/nmap/Makefile b/security/nmap/Makefile index 6150ff296a54..77fb663a6390 100644 --- a/security/nmap/Makefile +++ b/security/nmap/Makefile @@ -7,6 +7,7 @@ PORTNAME= nmap DISTVERSION= 4.85BETA7 +PORTREVISION= 1 CATEGORIES= security ipv6 MASTER_SITES= http://nmap.org/dist/ \ http://www.mirrors.wiretapped.net/security/network-mapping/nmap/ \ diff --git a/security/nmap/files/patch-ncat__ncat_core.c b/security/nmap/files/patch-ncat__ncat_core.c new file mode 100644 index 000000000000..ccab94e0c19e --- /dev/null +++ b/security/nmap/files/patch-ncat__ncat_core.c @@ -0,0 +1,33 @@ +--- ncat/ncat_core.c.orig 2009-04-02 04:57:42.000000000 +0200 ++++ ncat/ncat_core.c 2009-04-16 14:12:39.000000000 +0200 +@@ -11,6 +11,7 @@ + #include <netinet/in.h> + #include <arpa/inet.h> + #endif ++#include <sys/param.h> + #include <stdlib.h> + #include <string.h> + #include <stdio.h> +@@ -96,13 +97,22 @@ + rc = Snprintf(portbuf, sizeof(portbuf), "%hu", port); + assert(rc >= 0 && rc < sizeof(portbuf)); + ++#if (defined(__FreeBSD_version) && (__FreeBSD_version < 800075) \ ++ && ((__FreeBSD_version > 800000) || (__FreeBSD_version < 702000))) ++ rc = getaddrinfo(hostname, "domain", &hints, &result); ++#else + rc = getaddrinfo(hostname, portbuf, &hints, &result); ++#endif + if (rc != 0 || result == NULL) + return 0; + assert(result->ai_addrlen > 0 && result->ai_addrlen <= (int) sizeof(struct sockaddr_storage)); + *sslen = result->ai_addrlen; + memcpy(ss, result->ai_addr, *sslen); + freeaddrinfo(result); ++#if (defined(__FreeBSD_version) && (__FreeBSD_version < 800075) \ ++ && ((__FreeBSD_version > 800000) || (__FreeBSD_version < 702000))) ++ ((struct sockaddr_in *)ss)->sin_port = htons(port); ++#endif + return 1; + } + |