FreeBSD Bugzilla – Attachment 95398 Details for
Bug 133779
[maintainer] security/nmap - fix ncat host resolver
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
nmap-ncat-fix.diff
nmap-ncat-fix.diff (text/plain), 1.75 KB, created by
Daniel Roethlisberger
on 2009-04-16 14:20:03 UTC
(
hide
)
Description:
nmap-ncat-fix.diff
Filename:
MIME Type:
Creator:
Daniel Roethlisberger
Created:
2009-04-16 14:20:03 UTC
Size:
1.75 KB
patch
obsolete
>diff -ruN nmap.orig/Makefile nmap/Makefile >--- nmap.orig/Makefile 2009-04-13 11:53:53.000000000 +0200 >+++ nmap/Makefile 2009-04-16 13:33:54.000000000 +0200 >@@ -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 -ruN nmap.orig/files/patch-ncat__ncat_core.c nmap/files/patch-ncat__ncat_core.c >--- nmap.orig/files/patch-ncat__ncat_core.c 1970-01-01 01:00:00.000000000 +0100 >+++ nmap/files/patch-ncat__ncat_core.c 2009-04-16 14:12:56.000000000 +0200 >@@ -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; >+ } >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 133779
: 95398