[packages/dsniff] - fix conflicts with libpcap - use libtirpc for rpc code - rel 30

baggins baggins at pld-linux.org
Sat Oct 23 23:01:27 CEST 2021


commit 6cb165c3baf8e39520e7e935a66172d2400ba95c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Oct 23 23:00:13 2021 +0200

    - fix conflicts with libpcap
    - use libtirpc for rpc code
    - rel 30

 dsniff.spec |  7 +++++-
 pcap.patch  | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 rpc.patch   | 20 ++++++++++++++++
 3 files changed, 105 insertions(+), 1 deletion(-)
---
diff --git a/dsniff.spec b/dsniff.spec
index b58507e..c13cd31 100644
--- a/dsniff.spec
+++ b/dsniff.spec
@@ -1,7 +1,7 @@
 # TODO
 # - make R: firefox something generic (it uses X11 and remote.c to find
 #   browser window to send openURL(%s, %s) command there)
-%define		rel	29
+%define		rel	30
 Summary:	Network audit tools
 Summary(pl.UTF-8):	Narzędzia do kontroli sieci
 Name:		dsniff
@@ -14,6 +14,8 @@ Source0:	http://www.monkey.org/~dugsong/dsniff/beta/%{name}-%{version}b1.tar.gz
 Patch0:		debian.patch
 Patch1:		%{name}-libdir.patch
 Patch2:		%{name}-nolibs.patch
+Patch3:		pcap.patch
+Patch4:		rpc.patch
 # ggsniff 1.2 from http://ggsniff.sourceforge.net/
 #Patch3:	%{name}-gg.patch
 URL:		http://www.monkey.org/~dugsong/dsniff/
@@ -25,6 +27,7 @@ BuildRequires:	glibc-static
 BuildRequires:	libnet-devel >= 1:1.1
 BuildRequires:	libnids-devel
 BuildRequires:	libpcap-devel
+BuildRequires:	libtirpc-devel
 BuildRequires:	openssl-devel >= 0.9.7d
 BuildRequires:	rpm >= 4.4.9-56
 BuildRequires:	xorg-lib-libX11-devel
@@ -64,6 +67,8 @@ musi być wcześniej uruchomiony na lokalnym serwerze X.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
+%patch4 -p1
 
 %{__rm} configure
 
diff --git a/pcap.patch b/pcap.patch
new file mode 100644
index 0000000..b16f1b2
--- /dev/null
+++ b/pcap.patch
@@ -0,0 +1,79 @@
+--- dsniff-2.4/pcaputil.h~	2001-03-15 09:33:06.000000000 +0100
++++ dsniff-2.4/pcaputil.h	2021-10-23 22:47:00.870619350 +0200
+@@ -11,9 +11,9 @@
+ #ifndef PCAPUTIL_H
+ #define PCAPUTIL_H
+ 
+-pcap_t *pcap_init(char *intf, char *filter, int snaplen);
++pcap_t *dsniff_pcap_init(char *intf, char *filter, int snaplen);
+ 
+-int	pcap_dloff(pcap_t *pd);
++int	dsniff_pcap_dloff(pcap_t *pd);
+ 
+ char   *copy_argv(char **argv);
+ 
+--- dsniff-2.4/pcaputil.c~	2021-10-23 22:42:08.000000000 +0200
++++ dsniff-2.4/pcaputil.c	2021-10-23 22:47:56.183933244 +0200
+@@ -32,7 +32,7 @@
+ #endif
+ 
+ int
+-pcap_dloff(pcap_t *pd)
++dsniff_pcap_dloff(pcap_t *pd)
+ {
+ 	int offset = -1;
+ 	
+@@ -63,7 +63,7 @@
+ }
+ 
+ pcap_t *
+-pcap_init(char *intf, char *filter, int snaplen)
++dsniff_pcap_init(char *intf, char *filter, int snaplen)
+ {
+ 	pcap_t *pd;
+ 	u_int net, mask;
+--- dsniff-2.4/tcpkill.c~	2021-10-23 22:42:08.000000000 +0200
++++ dsniff-2.4/tcpkill.c	2021-10-23 22:49:35.162844763 +0200
+@@ -130,10 +130,10 @@
+ 	
+ 	filter = copy_argv(argv);
+ 	
+-	if ((pd = pcap_init(intf, filter, 64)) == NULL)
++	if ((pd = dsniff_pcap_init(intf, filter, 64)) == NULL)
+ 		errx(1, "couldn't initialize sniffing");
+ 
+-	if ((pcap_off = pcap_dloff(pd)) < 0)
++	if ((pcap_off = dsniff_pcap_dloff(pd)) < 0)
+ 		errx(1, "couldn't determine link layer offset");
+ 	
+ 	if ((l = libnet_init(LIBNET_RAW4, intf, libnet_ebuf)) == NULL)
+--- dsniff-2.4/tcpnice.c~	2021-10-23 22:42:08.000000000 +0200
++++ dsniff-2.4/tcpnice.c	2021-10-23 22:49:52.935900084 +0200
+@@ -204,10 +204,10 @@
+ 	
+ 	filter = copy_argv(argv);
+ 	
+-	if ((pd = pcap_init(intf, filter, 128)) == NULL)
++	if ((pd = dsniff_pcap_init(intf, filter, 128)) == NULL)
+ 		errx(1, "couldn't initialize sniffing");
+ 
+-	if ((pcap_off = pcap_dloff(pd)) < 0)
++	if ((pcap_off = dsniff_pcap_dloff(pd)) < 0)
+ 		errx(1, "couldn't determine link layer offset");
+ 	
+ 	if ((l = libnet_init(LIBNET_RAW4, intf, libnet_ebuf)) == NULL)
+--- dsniff-2.4/dnsspoof.c~	2021-10-23 22:42:08.000000000 +0200
++++ dsniff-2.4/dnsspoof.c	2021-10-23 22:50:13.142260253 +0200
+@@ -309,10 +309,10 @@
+ 	else snprintf(buf, sizeof(buf), "udp dst port 53 and not src %s",
+ 		      libnet_addr2name4(lnet_ip, LIBNET_DONT_RESOLVE));
+ 	
+-	if ((pcap_pd = pcap_init(dev, buf, 128)) == NULL)
++	if ((pcap_pd = dsniff_pcap_init(dev, buf, 128)) == NULL)
+ 		errx(1, "couldn't initialize sniffing");
+ 
+-	if ((pcap_off = pcap_dloff(pcap_pd)) < 0)
++	if ((pcap_off = dsniff_pcap_dloff(pcap_pd)) < 0)
+ 		errx(1, "couldn't determine link layer offset");
+ 	
+ 	if ((l = libnet_init(LIBNET_RAW4, dev, ebuf)) == NULL)
diff --git a/rpc.patch b/rpc.patch
new file mode 100644
index 0000000..493fd2b
--- /dev/null
+++ b/rpc.patch
@@ -0,0 +1,20 @@
+--- dsniff-2.4/Makefile.in~	2021-10-23 22:55:52.000000000 +0200
++++ dsniff-2.4/Makefile.in	2021-10-23 22:56:59.957739332 +0200
+@@ -16,7 +16,7 @@
+ mandir		= @mandir@
+ 
+ CC	= @CC@
+-CFLAGS	= @CFLAGS@ -DDSNIFF_LIBDIR=\"$(libdir)/\"
++CFLAGS	= @CFLAGS@ -DDSNIFF_LIBDIR=\"$(libdir)/\" -I/usr/include/tirpc
+ CPPFLAGS = @CPPFLAGS@
+ LDFLAGS	= @LDFLAGS@
+ 
+@@ -40,7 +40,7 @@
+ 
+ INCS	= -I. $(NIDSINC) $(PCAPINC) $(LNETINC) $(DBINC) $(SSLINC) $(X11INC) \
+ 	  -I$(srcdir)/missing
+-LIBS	= @LIBS@ -L$(srcdir) -lmissing
++LIBS	= @LIBS@ -L$(srcdir) -lmissing -ltirpc
+ 
+ INSTALL	= @INSTALL@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/dsniff.git/commitdiff/6cb165c3baf8e39520e7e935a66172d2400ba95c



More information about the pld-cvs-commit mailing list