diff --git a/security/py-ssh-audit/Makefile b/security/py-ssh-audit/Makefile index db5af9c0d653..db7b92d0d2a2 100644 --- a/security/py-ssh-audit/Makefile +++ b/security/py-ssh-audit/Makefile @@ -1,25 +1,26 @@ PORTNAME= ssh-audit DISTVERSIONPREFIX= v DISTVERSION= 3.2.0 +PORTREVISION= 1 CATEGORIES= security PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= pkubaj@FreeBSD.org COMMENT= SSH server auditing WWW= https://github.com/jtesta/ssh-audit LICENSE= MIT BUILD_DEPENDS= ${PY_SETUPTOOLS} \ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} USES= python USE_GITHUB= yes GH_ACCOUNT= jtesta USE_PYTHON= pep517 post-install: ${INSTALL_MAN} ${WRKSRC}/ssh-audit.1 ${STAGEDIR}${PREFIX}/share/man/man1 ${ECHO_CMD} share/man/man1/ssh-audit.1.gz >> ${TMPPLIST} .include diff --git a/security/py-ssh-audit/files/patch-src_ssh__audit_dheat.py b/security/py-ssh-audit/files/patch-src_ssh__audit_dheat.py new file mode 100644 index 000000000000..0049edb94d28 --- /dev/null +++ b/security/py-ssh-audit/files/patch-src_ssh__audit_dheat.py @@ -0,0 +1,23 @@ +--- src/ssh_audit/dheat.py.orig 2024-08-16 09:16:28 UTC ++++ src/ssh_audit/dheat.py +@@ -21,6 +21,7 @@ + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + """ ++import errno + import multiprocessing + import os + import queue +@@ -432,10 +433,10 @@ class DHEat: + # out.d("Creating socket (%u of %u already exist)..." % (len(socket_dict), concurrent_sockets), write_now=True) + ret = s.connect_ex((aconf.host, aconf.port)) + num_attempted_connections += 1 +- if ret in [0, 115]: # Check if connection is successful or EINPROGRESS. ++ if ret in [0, errno.EINPROGRESS]: + socket_dict[s] = now + else: +- out.d("connect_ex() returned: %d" % ret, write_now=True) ++ out.d("connect_ex() returned: %s (%d)" % (os.strerror(ret), ret), write_now=True) + + # out.d("Calling select() on %u sockets..." % len(socket_dict), write_now=True) + socket_list: List[socket.socket] = [*socket_dict] # Get a list of sockets from the dictionary.