aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2021-07-06 18:15:56 +0000
committerCy Schubert <cy@FreeBSD.org>2021-07-06 18:19:04 +0000
commitf12ae4971c1a2a049579eba10a3139da49775441 (patch)
tree980a25abfa0a29d7a8ab39d1d5b6eedc55aa78cc
parent814a894e90121538d402f40d5d1311adb2eda00f (diff)
downloadports-f12ae4971c1a2a049579eba10a3139da49775441.tar.gz
ports-f12ae4971c1a2a049579eba10a3139da49775441.zip
security/nmap: Fix broken --proxy
Upstream broke --proxy in 7.90 and was fixed after 7.91 and is yet to be released. PR: 256968 Submitted by: Ting-Wei Lan <lantw44@gmail.com> Reported by: Ting-Wei Lan <lantw44@gmail.com> Obtained from: Upstream 169d7e5a922ef8e63b51ee2bdf4fd4ad60ed2689 MFH: 2020Q3
-rw-r--r--security/nmap/Makefile2
-rw-r--r--security/nmap/files/patch-ncat_ncat__connect.c23
2 files changed, 24 insertions, 1 deletions
diff --git a/security/nmap/Makefile b/security/nmap/Makefile
index 9a989e0a9dec..d66887d252b6 100644
--- a/security/nmap/Makefile
+++ b/security/nmap/Makefile
@@ -2,7 +2,7 @@
PORTNAME= nmap
DISTVERSION= 7.91
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= https://nmap.org/dist/ \
LOCAL/ohauer
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 */