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
This commit is contained in:
Cy Schubert 2021-07-06 11:15:56 -07:00
parent 814a894e90
commit f12ae4971c
2 changed files with 24 additions and 1 deletions

View file

@ -2,7 +2,7 @@
PORTNAME= nmap
DISTVERSION= 7.91
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= https://nmap.org/dist/ \
LOCAL/ohauer

View file

@ -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 */