diff --git a/security/nmap/Makefile b/security/nmap/Makefile index 9a989e0a9dec..d66887d252b6 100644 --- a/security/nmap/Makefile +++ b/security/nmap/Makefile @@ -1,84 +1,84 @@ # Created by: David O'Brien (obrien@NUXI.com) PORTNAME= nmap DISTVERSION= 7.91 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= https://nmap.org/dist/ \ LOCAL/ohauer MAINTAINER?= cy@FreeBSD.org COMMENT?= Port scanning utility for large networks # nmap-6.47 => svn.nmap.org/nmap-releases/nmap-6.47 (r33605) # https://nmap.org/book/man-legal.html # Install the nmap modified license because of # http://insecure.org/news/download-com-fiasco.html LICENSE= NPSL LICENSE_NAME= Nmap Public Source License LICENSE_PERMS= auto-accept dist-mirror pkg-mirror pkg-sell LICENSE_FILE= ${WRKSRC}/LICENSE .if !defined(MASTERDIR) LIB_DEPENDS= libpcre.so:devel/pcre USES= tar:bzip2 gmake cpe GNU_CONFIGURE= yes OPTIONS_SUB= yes OPTIONS_DEFINE= DOCS PCAP SSH2 SSL OPTIONS_DEFAULT=PCAP SSH2 SSL PCAP_DESC= Build with libpcap from nmap SSH2_DESC= SSH2 protocol support PCAP_CONFIGURE_ON= --with-libpcap=included SSH2_CONFIGURE_ON= --with-libssh2=included SSH2_CONFIGURE_OFF= --without-libssh2 SSH2_IMPLIES= SSL SSL_USES= ssl SSL_CONFIGURE_ON= --with-openssl=${OPENSSLBASE} SSL_CONFIGURE_OFF= --without-openssl SSL_CFLAGS= -I${OPENSSLINC} SSL_VARS= STRIP_FILES+=ncat DOCS= CHANGELOG HACKING STRIP_FILES+= nmap nping CONFIGURE_ARGS+=--without-localdirs \ --without-zenmap \ --without-ndiff \ --with-libpcre=${LOCALBASE} \ --with-liblua=included \ --without-nmap-update # XXX limit results if we do a grep in the sources! post-extract: @${RM} -r ${WRKSRC}/mswin32 .if exists(/usr/lib/libibverbs.a) # Link with libibverbs is needed by static libpcap post-patch-PCAP-on: @${REINPLACE_CMD} -E -e "s|(PCAP_LIBS=['\"].*)(['\"])$$|\1 -libverbs\2|" \ ${WRKSRC}/configure \ ${WRKSRC}/nping/configure \ ${WRKSRC}/ncat/configure .endif post-configure: @${REINPLACE_CMD} -e "s|^DESTDIR *=|& ${DESTDIR}|" ${WRKSRC}/Makefile pre-install: ${FIND} ${WRKSRC} -type f \( -name \*.orig -o -name \*.bak \) -delete post-install: ${STRIP_CMD} ${STRIP_FILES:S|^|${STAGEDIR}${PREFIX}/bin/|} post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${DOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} .endif .include diff --git a/security/nmap/files/patch-ncat_ncat__connect.c b/security/nmap/files/patch-ncat_ncat__connect.c new file mode 100644 index 000000000000..8d6260912e07 --- /dev/null +++ b/security/nmap/files/patch-ncat_ncat__connect.c @@ -0,0 +1,23 @@ +--- ncat/ncat_connect.c ++++ ncat/ncat_connect.c +@@ -1064,12 +1064,17 @@ int ncat_connect(void) + bye("Failed to set hostname on iod."); + if (o.ssl) + { ++ /* connect_handler creates stdin_nsi and calls post_connect */ + nsock_reconnect_ssl(mypool, cs.sock_nsi, connect_handler, o.conntimeout, NULL, NULL); + } ++ else ++ { ++ /* Create IOD for nsp->stdin */ ++ if ((cs.stdin_nsi = nsock_iod_new2(mypool, 0, NULL)) == NULL) ++ bye("Failed to create stdin nsiod."); + +- /* Create IOD for nsp->stdin */ +- if ((cs.stdin_nsi = nsock_iod_new2(mypool, 0, NULL)) == NULL) +- bye("Failed to create stdin nsiod."); ++ post_connect(mypool, cs.sock_nsi); ++ } + } + + /* connect */