(cherry picked from commit 4d5eadc5197fa33f61f2b2ebb2ce57093ff34030)
This commit is contained in:
quanhongfei 2021-12-09 15:52:24 +08:00 committed by openeuler-sync-bot
parent fc9b834bf6
commit 78fee74dde
4 changed files with 50 additions and 6 deletions

View File

@ -0,0 +1,23 @@
--- nmap-4.03/shtool 2006-05-10 13:09:34.000000000 +0200
+++ nmap-4.03/shtool 2006-05-10 13:13:58.000000000 +0200
@@ -579,15 +579,11 @@
else
tmpdir="/tmp"
fi
- tmpdir="$tmpdir/.shtool.$$"
- ( umask 077
- rm -rf "$tmpdir" >/dev/null 2>&1 || true
- mkdir "$tmpdir" >/dev/null 2>&1
- if [ $? -ne 0 ]; then
- echo "$msgprefix:Error: failed to create temporary directory \`$tmpdir'" 1>&2
- exit 1
- fi
- )
+ tmpdir=`mktemp -p $tmpdir -d`
+ if [ $? -ne 0 ]; then
+ echo "$msgprefix:Error: failed to create temporary directory \`$tmpdir'" 1>&2
+ exit 1
+ fi
# create (implicitly) secure temporary file
tmpfile="$tmpdir/shtool.tmp"

View File

@ -0,0 +1,12 @@
diff --git a/ncat/ncat_core.c b/ncat/ncat_core.c
index b76d5ea..9f0b0cf 100644
--- a/ncat/ncat_core.c
+++ b/ncat/ncat_core.c
@@ -289,6 +289,7 @@ int resolve(const char *hostname, unsigned short port,
int result;
flags = 0;
+ flags |= AI_ADDRCONFIG;
if (o.nodns)
flags |= AI_NUMERICHOST;

View File

@ -2,13 +2,13 @@
Name: nmap
Epoch: 2
Version: 7.80
Version: 7.92
Release: 1
License: Nmap
Summary: A tool for network discovery and security auditing.
Requires: %{name}-ncat = %{epoch}:%{version}-%{release}
URL: https://nmap.org/
Source0: https://nmap.org/dist/%{name}-%{version}%{?prerelease}.tar.bz2
Source0: https://nmap.org/dist/%{name}-%{version}.tar.bz2
BuildRequires: automake autoconf gcc-c++ gettext-devel libpcap-devel libssh2-devel
BuildRequires: libtool lua-devel openssl-devel pcre-devel
@ -16,6 +16,9 @@ Obsoletes: nmap-frontend nmap-ndiff nmap-ncat nc < 1.109.20120711-2
Obsoletes: nc6 < 1.00-22
Provides: nmap-frontend nmap-ndiff nmap-ncat nc nc6
Patch0001: backport-nmap-4.03-mktemp.patch
Patch0002: backport-nmap_resolve_config.patch
%define pixmap_srcdir zenmap/share/pixmaps
%description
@ -43,15 +46,15 @@ make DESTDIR=%{buildroot} STRIP=true install
rm -f %{buildroot}%{_datadir}/ncat/ca-bundle.crt
rmdir %{buildroot}%{_datadir}/ncat
ln -s ncat.1.gz %{buildroot}%{_mandir}/man1/nc.1.gz
ln -s ncat %{buildroot}%{_bindir}/nc
touch %{buildroot}%{_mandir}/man1/nc.1.gz
touch %{buildroot}%{_bindir}/nc
%find_lang nmap --with-man
%files -f nmap.lang
%defattr(-,root,root)
%doc ncat/docs/AUTHORS ncat/docs/README
%license COPYING*
%doc ncat/docs/AUTHORS ncat/docs/README
%license LICENSE
%{_bindir}/n*
%{_datadir}/nmap
%exclude %{_datadir}/ncat
@ -62,6 +65,12 @@ ln -s ncat %{buildroot}%{_bindir}/nc
%{_mandir}/man1/*.1.gz
%changelog
* Thu Dec 09 2021 quanhongfei <quanhongfei@huawei.com> - 2:7.92-1
- Type:requirement
- ID:NA
- SUG:NA
- DESC:update nmap to 7.92
* Sun Jun 28 2020 gaihuiying <gaihuiying@huawei.com> - 2:7.80-1
- Type:requirement
- ID:NA