Projects
openEuler:Mainline
nmap
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 7
View file
_service:tar_scm:nmap.spec
Changed
@@ -3,22 +3,24 @@ Name: nmap Epoch: 2 Version: 7.92 -Release: 4 +Release: 5 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}.tar.bz2 BuildRequires: automake autoconf gcc-c++ gettext-devel libpcap-devel libssh2-devel -BuildRequires: libtool lua-devel openssl-devel +BuildRequires: libtool lua-devel openssl-devel pcre2-devel 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 -Patch0003: nmap-replace-sensitive-words.patch +Patch0001: backport-nmap-4.03-mktemp.patch +Patch0002: backport-nmap_resolve_config.patch +Patch0003: nmap-replace-sensitive-words.patch +Patch0004: backport-upgrade-libpcre-to-PCRE2-10.42.patch +Patch0005: backport-remove-nse_pcrelib-from-build.patch %define pixmap_srcdir zenmap/share/pixmaps @@ -66,6 +68,12 @@ %{_mandir}/man1/*.1.gz %changelog +* Thu Jul 06 2023 xingwei <xingwei14@h-partners.com> - 2:7.92-5 +- Type:bugfix +- CVE: +- SUG:NA +- DESC:add pcre2 support + * Mon May 29 2023 xingwei <xingwei14@h-partners.com> - 2:7.92-4 - Type:bugfix - CVE:
View file
_service:tar_scm:backport-remove-nse_pcrelib-from-build.patch
Added
@@ -0,0 +1,80 @@ +From d131a096a869195be36ef7d4fa36739373346cb2 Mon Sep 17 00:00:00 2001 +From: dmiller <dmiller@e0a8ed71-7df4-0310-8962-fdc924857419> +Date: Sat, 24 Jun 2023 01:53:09 +0000 +Subject: PATCH Remove nse_pcrelib from build. + +Conflict: NA +Reference: https://github.com/nmap/nmap/commit/d131a096a869195be36ef7d4fa36739373346cb2 +--- + Makefile.in | 6 +++--- + mswin32/nmap.vcxproj | 2 -- + nse_main.cc | 2 -- + nse_main.lua | 2 +- + nselib/unittest.lua | 1 - + 5 files changed, 4 insertions(+), 9 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index ccfceda..8c19056 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -88,9 +88,9 @@ UNINSTALLNDIFF=@UNINSTALLNDIFF@ + UNINSTALLNPING=@UNINSTALLNPING@ + + ifneq (@NOLUA@,yes) +-NSE_SRC=nse_main.cc nse_utility.cc nse_nsock.cc nse_dnet.cc nse_fs.cc nse_nmaplib.cc nse_debug.cc nse_pcrelib.cc nse_lpeg.cc +-NSE_HDRS=nse_main.h nse_utility.h nse_nsock.h nse_dnet.h nse_fs.h nse_nmaplib.h nse_debug.h nse_pcrelib.h nse_lpeg.h +-NSE_OBJS=nse_main.o nse_utility.o nse_nsock.o nse_dnet.o nse_fs.o nse_nmaplib.o nse_debug.o nse_pcrelib.o nse_lpeg.o ++NSE_SRC=nse_main.cc nse_utility.cc nse_nsock.cc nse_dnet.cc nse_fs.cc nse_nmaplib.cc nse_debug.cc nse_lpeg.cc ++NSE_HDRS=nse_main.h nse_utility.h nse_nsock.h nse_dnet.h nse_fs.h nse_nmaplib.h nse_debug.h nse_lpeg.h ++NSE_OBJS=nse_main.o nse_utility.o nse_nsock.o nse_dnet.o nse_fs.o nse_nmaplib.o nse_debug.o nse_lpeg.o + ifneq (@OPENSSL_LIBS@,) + NSE_SRC+=nse_openssl.cc nse_ssl_cert.cc + NSE_HDRS+=nse_openssl.h nse_ssl_cert.h +diff --git a/nse_main.cc b/nse_main.cc +index 110291f..b946c7c 100644 +--- a/nse_main.cc ++++ b/nse_main.cc +@@ -14,7 +14,6 @@ + #include "nse_fs.h" + #include "nse_nsock.h" + #include "nse_nmaplib.h" +-#include "nse_pcrelib.h" + #include "nse_openssl.h" + #include "nse_debug.h" + #include "nse_lpeg.h" +@@ -557,7 +556,6 @@ static int panic (lua_State *L) + static void set_nmap_libraries (lua_State *L) + { + static const luaL_Reg libs = { +- {NSE_PCRELIBNAME, luaopen_pcrelib}, + {NSE_NMAPLIBNAME, luaopen_nmap}, + {LFSLIBNAME, luaopen_lfs}, + {LPEGLIBNAME, luaopen_lpeg}, +diff --git a/nse_main.lua b/nse_main.lua +index af5f611..7fba46e 100644 +--- a/nse_main.lua ++++ b/nse_main.lua +@@ -285,7 +285,7 @@ local REQUIRE_ERROR = {}; + rawset(stdnse, "silent_require", function (...) + local status, mod = pcall(require, ...); + if not status then +- print_debug(1, "%s", traceback(mod)); ++ print_debug(2, "%s", traceback(mod)); + error(REQUIRE_ERROR) + else + return mod; +diff --git a/nselib/unittest.lua b/nselib/unittest.lua +index ac90c31..d780b85 100644 +--- a/nselib/unittest.lua ++++ b/nselib/unittest.lua +@@ -107,7 +107,6 @@ local libs = { + "ospf", + "outlib", + "packet", +-"pcre", + "pgsql", + "pop3", + "pppoe", +-- +2.33.0 +
View file
_service:tar_scm:backport-upgrade-libpcre-to-PCRE2-10.42.patch
Added
@@ -0,0 +1,1336 @@ +From 828ab48764b82d0226e860c73c5dac5b11f77385 Mon Sep 17 00:00:00 2001 +From: dmiller <dmiller@e0a8ed71-7df4-0310-8962-fdc924857419> +Date: Sat, 24 Jun 2023 01:53:07 +0000 +Subject: PATCH Upgrade libpcre to PCRE2 10.42. Windows/macOS builds not + completed. + +Conflict: Remove pcre2 source code modification, which can be replaced by pcre2-devel dependency +Reference: https://github.com/nmap/nmap/commit/828ab48764b82d0226e860c73c5dac5b11f77385 +--- + checklibs.sh | 10 +- + configure | 92 +++------ + configure.ac | 23 +-- + nmap.cc | 6 +- + nmap_config.h.in | 2 - + nping/nping_config.h.in | 2 - + nse_pcrelib.cc | 400 ---------------------------------------- + nse_pcrelib.h | 9 - + nselib/pcre.luadoc | 135 -------------- + service_scan.cc | 180 ++++++++++-------- + service_scan.h | 33 ++-- + 11 files changed, 156 insertions(+), 736 deletions(-) + delete mode 100644 nse_pcrelib.cc + delete mode 100644 nse_pcrelib.h + delete mode 100644 nselib/pcre.luadoc + +diff --git a/checklibs.sh b/checklibs.sh +index ff58326..6483358 100644 +--- a/checklibs.sh ++++ b/checklibs.sh +@@ -11,13 +11,13 @@ trim_version() { + } + + check_libpcre() { +- PCRE_SOURCE="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/" ++ PCRE_SOURCE="https://github.com/PCRE2Project/pcre2/releases/latest" + PCRE_MAJOR="" + PCRE_MINOR="" +- eval $(grep '^PCRE_MAJOR=' $NDIR/libpcre/configure) +- eval $(grep '^PCRE_MINOR=' $NDIR/libpcre/configure) +- PCRE_VERSION="$PCRE_MAJOR.$PCRE_MINOR" +- PCRE_LATEST=$(curl -ls $PCRE_SOURCE | perl -lne 'if(/pcre-(\d+.\d+).tar.gz$/){print $1}' | newest) ++ eval $(grep '^PCRE2_MAJOR=' $NDIR/libpcre/configure) ++ eval $(grep '^PCRE2_MINOR=' $NDIR/libpcre/configure) ++ PCRE_VERSION="$PCRE2_MAJOR.$PCRE2_MINOR" ++ PCRE_LATEST=$(curl -s -I $PCRE_SOURCE | tee tmp.txt | perl -lne 'if(m|^Location:.*/tag/pcre2-(\d+.\d+)\r\n*$|){print $1;exit(0)}') + if "$PCRE_VERSION" != "$PCRE_LATEST" ; then + echo "Newer version of libpcre available" + echo " Current:" $PCRE_VERSION +diff --git a/configure b/configure +index f8e1358..26cb1f6 100755 +--- a/configure ++++ b/configure +@@ -1451,8 +1451,8 @@ Optional Packages: + DIR/lib/ and DIR/include/openssl/) + --with-libpcap=DIR Look for pcap in DIR/include and DIR/libs. + --with-libpcap=included Always use version included with Nmap +- --with-libpcre=DIR Use an existing (compiled) pcre lib from DIR/include +- and DIR/lib. ++ --with-libpcre=DIR Use an existing (compiled) pcre2 lib from ++ DIR/include and DIR/lib. + --with-libpcre=included Always use the version included with Nmap + --with-libz=DIR Use specific copy of libz + --with-libz=included Always use version included with Nmap +@@ -6421,58 +6421,19 @@ fi + + # If they didn't specify it, we try to find it + if test $have_pcre != yes -a $requested_included_pcre != yes ; then +- ac_fn_c_check_header_mongrel "$LINENO" "pcre.h" "ac_cv_header_pcre_h" "$ac_includes_default" +-if test "x$ac_cv_header_pcre_h" = xyes; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_version in -lpcre" >&5 +-$as_echo_n "checking for pcre_version in -lpcre... " >&6; } +-if ${ac_cv_lib_pcre_pcre_version+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lpcre $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ ++ ac_fn_c_check_header_compile "$LINENO" "pcre2.h" "ac_cv_header_pcre2_h" " ++#define PCRE2_CODE_UNIT_WIDTH 8 + +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char pcre_version (); +-int +-main () +-{ +-return pcre_version (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_pcre_pcre_version=yes +-else +- ac_cv_lib_pcre_pcre_version=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_version" >&5 +-$as_echo "$ac_cv_lib_pcre_pcre_version" >&6; } +-if test "x$ac_cv_lib_pcre_pcre_version" = xyes; then : +- have_pcre=yes +-fi + +-else +- ac_fn_c_check_header_mongrel "$LINENO" "pcre/pcre.h" "ac_cv_header_pcre_pcre_h" "$ac_includes_default" +-if test "x$ac_cv_header_pcre_pcre_h" = xyes; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_version in -lpcre" >&5 +-$as_echo_n "checking for pcre_version in -lpcre... " >&6; } +-if ${ac_cv_lib_pcre_pcre_version+:} false; then : ++" ++if test "x$ac_cv_header_pcre2_h" = xyes; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre2_compile_8 in -lpcre2-8" >&5 ++$as_echo_n "checking for pcre2_compile_8 in -lpcre2-8... " >&6; } ++if ${ac_cv_lib_pcre2_8_pcre2_compile_8+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lpcre $LIBS" ++LIBS="-lpcre2-8 $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -6482,35 +6443,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + #ifdef __cplusplus + extern "C" + #endif +-char pcre_version (); ++char pcre2_compile_8 (); + int + main () + { +-return pcre_version (); ++return pcre2_compile_8 (); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_pcre_pcre_version=yes ++ ac_cv_lib_pcre2_8_pcre2_compile_8=yes + else +- ac_cv_lib_pcre_pcre_version=no ++ ac_cv_lib_pcre2_8_pcre2_compile_8=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_version" >&5 +-$as_echo "$ac_cv_lib_pcre_pcre_version" >&6; } +-if test "x$ac_cv_lib_pcre_pcre_version" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre2_8_pcre2_compile_8" >&5 ++$as_echo "$ac_cv_lib_pcre2_8_pcre2_compile_8" >&6; } ++if test "x$ac_cv_lib_pcre2_8_pcre2_compile_8" = xyes; then : + have_pcre=yes + fi + +- +-fi +- +- +- + fi + + +@@ -6520,8 +6476,8 @@ fi + if test $have_pcre != yes ; then + subdirs="$subdirs libpcre" + +- CPPFLAGS="-I\$(top_srcdir)/$LIBPCREDIR $CPPFLAGS" +- LIBPCRE_LIBS="$LIBPCREDIR/libpcre.a" ++ CPPFLAGS="-I\$(top_srcdir)/$LIBPCREDIR/src $CPPFLAGS" ++ LIBPCRE_LIBS="$LIBPCREDIR/.libs/libpcre2-8.a" + PCRE_BUILD="build-pcre" + PCRE_CLEAN="clean-pcre" + PCRE_DIST_CLEAN="distclean-pcre" +@@ -6530,19 +6486,19 @@ $as_echo "#define PCRE_INCLUDED 1" >>confdefs.h + + else + # We only need to check for and use this if we are NOT using included pcre +- for ac_header in pcre/pcre.h ++ for ac_header in pcre2.h + do : +- ac_fn_c_check_header_mongrel "$LINENO" "pcre/pcre.h" "ac_cv_header_pcre_pcre_h" "$ac_includes_default" +-if test "x$ac_cv_header_pcre_pcre_h" = xyes; then : ++ ac_fn_c_check_header_mongrel "$LINENO" "pcre2.h" "ac_cv_header_pcre2_h" "$ac_includes_default" ++if test "x$ac_cv_header_pcre2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define HAVE_PCRE_PCRE_H 1 ++#define HAVE_PCRE2_H 1 + _ACEOF
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2