Sync from SUSE:SLFO:Main nmap revision d0af234e06248778878f71019acc186e
This commit is contained in:
parent
2350b0b079
commit
785f4dd78a
54
nmap-fix-build-libpcap-1.10.5.patch
Normal file
54
nmap-fix-build-libpcap-1.10.5.patch
Normal file
@ -0,0 +1,54 @@
|
||||
Index: b/nse_nsock.cc
|
||||
===================================================================
|
||||
--- a/nse_nsock.cc
|
||||
+++ b/nse_nsock.cc
|
||||
@@ -33,7 +33,7 @@
|
||||
enum {
|
||||
NSOCK_POOL = lua_upvalueindex(1),
|
||||
NSOCK_SOCKET = lua_upvalueindex(2), /* nsock socket metatable */
|
||||
- PCAP_SOCKET = lua_upvalueindex(3), /* pcap socket metatable */
|
||||
+ PCAP_SOCKET_NMAP = lua_upvalueindex(3), /* pcap socket metatable */
|
||||
THREAD_SOCKETS = lua_upvalueindex(4), /* <Thread, Table of Sockets (keys)> */
|
||||
CONNECT_WAITING = lua_upvalueindex(5), /* Threads waiting to lock */
|
||||
KEY_PCAP = lua_upvalueindex(6) /* Keys to pcap sockets */
|
||||
@@ -969,7 +969,7 @@ static int nsock_gc (lua_State *L)
|
||||
}
|
||||
|
||||
|
||||
-/****************** PCAP_SOCKET ***********************************************/
|
||||
+/****************** PCAP_SOCKET_NMAP ***********************************************/
|
||||
|
||||
static void dnet_to_pcap_device_name (lua_State *L, const char *device)
|
||||
{
|
||||
@@ -1036,7 +1036,7 @@ static int l_pcap_open (lua_State *L)
|
||||
nsock_iod_delete(*nsiod, NSOCK_PENDING_ERROR);
|
||||
luaL_error(L, "can't open pcap reader on %s", device);
|
||||
}
|
||||
- lua_pushvalue(L, PCAP_SOCKET);
|
||||
+ lua_pushvalue(L, PCAP_SOCKET_NMAP);
|
||||
lua_setmetatable(L, -2);
|
||||
lua_pushvalue(L, 7); /* the pcap socket key */
|
||||
lua_pushvalue(L, -2); /* the pcap socket nsiod */
|
||||
@@ -1144,7 +1144,7 @@ LUALIB_API int luaopen_nsock (lua_State
|
||||
/* library upvalues */
|
||||
nsock_pool nsp = new_pool(L); /* NSOCK_POOL */
|
||||
lua_newtable(L); /* NSOCK_SOCKET */
|
||||
- lua_newtable(L); /* PCAP_SOCKET */
|
||||
+ lua_newtable(L); /* PCAP_SOCKET_NMAP */
|
||||
nseU_weaktable(L, 0, MAX_PARALLELISM, "k"); /* THREAD_SOCKETS */
|
||||
nseU_weaktable(L, 0, 1000, "k"); /* CONNECT_WAITING */
|
||||
nseU_weaktable(L, 0, 0, "v"); /* KEY_PCAP */
|
||||
@@ -1164,11 +1164,11 @@ LUALIB_API int luaopen_nsock (lua_State
|
||||
lua_pop(L, 1); /* NSOCK_SOCKET */
|
||||
|
||||
/* Create the nsock pcap metatable */
|
||||
- lua_pushvalue(L, top+3); /* PCAP_SOCKET */
|
||||
+ lua_pushvalue(L, top+3); /* PCAP_SOCKET_NMAP */
|
||||
for (i = top+1; i <= top+nupvals; i++) lua_pushvalue(L, i);
|
||||
lua_pushcclosure(L, pcap_gc, nupvals);
|
||||
lua_setfield(L, top+3, "__gc");
|
||||
- lua_pop(L, 1); /* PCAP_SOCKET */
|
||||
+ lua_pop(L, 1); /* PCAP_SOCKET_NMAP */
|
||||
|
||||
#if HAVE_OPENSSL
|
||||
/* Set up the SSL certificate userdata code in nse_ssl_cert.cc. */
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 28 15:04:53 UTC 2025 - Antonio Teixeira <antonio.teixeira@suse.com>
|
||||
|
||||
- Add nmap-fix-build-libpcap-1.10.5.patch
|
||||
* libpcap 1.10.5 defines PCAP_SOCKET. Avoid redefinition in nmap by
|
||||
renaming it. Fixes builds with libpcap >= 1.10.5.
|
||||
- Replace deprecated %patchN macros
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 4 17:06:13 UTC 2021 - Danilo Spinella <danilo.spinella@suse.com>
|
||||
|
||||
|
11
nmap.spec
11
nmap.spec
@ -41,6 +41,8 @@ Patch1: nmap-7.40-desktop_files.patch
|
||||
Patch2: nmap-4.75-nostrip.patch
|
||||
Patch3: su-to-zenmap.patch
|
||||
Patch4: nmap-ncat-skip-network-tests.patch
|
||||
# PATCH-FIX-SUSE nmap-fix-build-libpcap-1.10.5.patch antonio.teixeira@suse.com -- libpcap 1.10.5 defines PCAP_SOCKET. Avoid redefinition in nmap by renaming it.
|
||||
Patch5: nmap-fix-build-libpcap-1.10.5.patch
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
@ -119,13 +121,14 @@ Service attacks, route tracing, etc.
|
||||
%prep
|
||||
%setup -q
|
||||
%if %{with_python2}
|
||||
%patch1 -p1
|
||||
%patch -P 1 -p1
|
||||
%endif
|
||||
%patch2
|
||||
%patch -P 2
|
||||
%if %{with_python2}
|
||||
%patch3
|
||||
%patch -P 3
|
||||
%endif
|
||||
%patch4 -p1
|
||||
%patch -P 4 -p1
|
||||
%patch -P 5 -p1
|
||||
|
||||
# use system provided libraries
|
||||
rm -rf libpcap libpcre macosx mswin32
|
||||
|
Loading…
x
Reference in New Issue
Block a user