- fix security/nmap runtime on current (FreeBSD 11)
- adopt ${opt}_USE style - remove ${opt} PKGNAMEPREFIX - bump PORTREVISION PR: ports/184288 Submitted by: Ruslan Makhmatkhanov <rm@FreeBSD.org>
This commit is contained in:
parent
864818635f
commit
29dc006884
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=334897
@ -3,6 +3,7 @@
|
||||
|
||||
PORTNAME= nmap
|
||||
DISTVERSION= 6.40
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= security ipv6
|
||||
MASTER_SITES= http://nmap.org/dist/ \
|
||||
LOCAL/ohauer
|
||||
@ -28,16 +29,18 @@ OPTIONS_SUB= yes
|
||||
OPTIONS_DEFINE= DOCS IPV6 SSL
|
||||
OPTIONS_DEFAULT=IPV6 SSL
|
||||
|
||||
SSL_USE= OPENSSL=yes
|
||||
SSL_CONFIGURE_ON= --with-openssl=${OPENSSLBASE}
|
||||
SSL_CONFIGURE_OFF= --without-openssl
|
||||
SSL_CFLAGS= -I${OPENSSLINC}
|
||||
|
||||
IPV6_CONFIGURE_OFF= --with-libpcap=${LOCALBASE}/IPv6
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MSSL}
|
||||
USE_OPENSSL= yes
|
||||
.else
|
||||
PKGNAMESUFFIX= -nossl
|
||||
# PR: ports/159376 Workaround if OS is build with WITHOUT_INET6
|
||||
.if ! ${PORT_OPTIONS:MIPV6}
|
||||
LIB_DEPENDS+= libpcap.so:${PORTSDIR}/net/libpcap
|
||||
.endif
|
||||
|
||||
CONFIGURE_ARGS+=--without-localdirs \
|
||||
@ -58,12 +61,6 @@ NDCC= true
|
||||
|
||||
PORTDOCS= CHANGELOG HACKING
|
||||
|
||||
# PR: ports/159376 Workaround if OS is build with WITHOUT_INET6
|
||||
.if ! ${PORT_OPTIONS:MIPV6}
|
||||
LIB_DEPENDS+= libpcap.so:${PORTSDIR}/net/libpcap
|
||||
CONFIGURE_ARGS+= --with-libpcap=${LOCALBASE}
|
||||
.endif
|
||||
|
||||
# XXX limit results if we do a grep in the sources!
|
||||
post-extract:
|
||||
@${RM} -rf ${WRKSRC}/mswin32
|
||||
@ -78,10 +75,8 @@ post-configure:
|
||||
@${REINPLACE_CMD} -e "s|^DESTDIR *=|& ${DESTDIR}|" ${WRKSRC}/Makefile
|
||||
|
||||
post-install:
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
@${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
|
||||
.endif
|
||||
|
||||
# gcc from ports is in use
|
||||
.if defined(NDCC)
|
||||
|
31
security/nmap/files/patch-libnetutil__netutil.cc
Normal file
31
security/nmap/files/patch-libnetutil__netutil.cc
Normal file
@ -0,0 +1,31 @@
|
||||
PR: ports/184288
|
||||
Fix security/nmap runtime on current (FreeBSD 11)
|
||||
==========================================================================
|
||||
--- ./libnetutil/netutil.cc.orig 2013-07-29 00:08:48.000000000 +0200
|
||||
+++ ./libnetutil/netutil.cc 2013-11-25 21:26:22.000000000 +0100
|
||||
@@ -1319,7 +1319,11 @@
|
||||
/* The first time through the loop we add the primary interface record.
|
||||
After that we add the aliases one at a time. */
|
||||
if (!primary_done) {
|
||||
- if (addr_ntos(&entry->intf_addr, (struct sockaddr *) &tmpss) == -1) {
|
||||
+ if ( (addr_ntos(&entry->intf_addr, (struct sockaddr *) &tmpss) == -1)
|
||||
+#ifdef AF_LINK
|
||||
+ || (tmpss.ss_family == AF_LINK)
|
||||
+#endif
|
||||
+ ) {
|
||||
dcrn->ifaces[dcrn->numifaces].addr.ss_family = 0;
|
||||
} else {
|
||||
rc = canonicalize_address(&tmpss, &dcrn->ifaces[dcrn->numifaces].addr);
|
||||
@@ -1328,7 +1332,11 @@
|
||||
dcrn->ifaces[dcrn->numifaces].netmask_bits = entry->intf_addr.addr_bits;
|
||||
primary_done = true;
|
||||
} else if (num_aliases_done < entry->intf_alias_num) {
|
||||
- if (addr_ntos(&entry->intf_alias_addrs[num_aliases_done], (struct sockaddr *) &tmpss) == -1) {
|
||||
+ if ( (addr_ntos(&entry->intf_alias_addrs[num_aliases_done], (struct sockaddr *) &tmpss) == -1)
|
||||
+#ifdef AF_LINK
|
||||
+ || (tmpss.ss_family == AF_LINK)
|
||||
+#endif
|
||||
+ ) {
|
||||
dcrn->ifaces[dcrn->numifaces].addr.ss_family = 0;
|
||||
} else {
|
||||
rc = canonicalize_address(&tmpss, &dcrn->ifaces[dcrn->numifaces].addr);
|
Loading…
Reference in New Issue
Block a user