svn commit: r334897 - in head/security/nmap: . files

Olli Hauer ohauer at FreeBSD.org
Mon Nov 25 20:49:59 UTC 2013


Author: ohauer
Date: Mon Nov 25 20:49:58 2013
New Revision: 334897
URL: http://svnweb.freebsd.org/changeset/ports/334897

Log:
  - 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 at FreeBSD.org>

Added:
  head/security/nmap/files/patch-libnetutil__netutil.cc   (contents, props changed)
Modified:
  head/security/nmap/Makefile

Modified: head/security/nmap/Makefile
==============================================================================
--- head/security/nmap/Makefile	Mon Nov 25 20:30:54 2013	(r334896)
+++ head/security/nmap/Makefile	Mon Nov 25 20:49:58 2013	(r334897)
@@ -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)

Added: head/security/nmap/files/patch-libnetutil__netutil.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/nmap/files/patch-libnetutil__netutil.cc	Mon Nov 25 20:49:58 2013	(r334897)
@@ -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);


More information about the svn-ports-all mailing list