aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/dsniff/dsniff-rpc.patch
blob: 17e11cebda8284607b6ddeb544156ea11befd24e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
this patch removes the functionality that depends on sun rpc,
which either cannot be implemented using the portablexdr rpc
replacement library, or depend on the host rpcgen utility
to generate some headers and source files.

it should be possible to build some of the disabled files
(for example decoding of NFS packets) with rpcgen installed
on the host; however i think it's too much of a burden to
force the crosscompile user to install portablexdr on his host
as well (to get the utility).
a viable alternative could be to generate those files on a host
with rpcgen installed and ship them together with the package.

there's still functionality using rpc enabled, since the entire
file logging infrastructure uses xdr structures and functions
to store records, fortunately this functionality is provided
by portablexdr.

additionally it disables build of the obsolete sshmitm utility.
obsolete because noone uses SSHv1 anymore.
the reason for disabling it is that it uses deprecated DES
functions/types from openssh which are disabled in our build,
causing the build to fail.

--- dsniff-2.4.org/Makefile.in	2014-08-13 00:44:31.072293717 +0200
+++ dsniff-2.4/Makefile.in	2014-08-13 01:44:17.556299388 +0200
@@ -47,28 +47,26 @@
 RANLIB	= @RANLIB@
 
 HDRS	= asn1.h base64.h buf.h decode.h hex.h magic.h options.h \
-	  pathnames.h pcaputil.h record.h rpc.h tcp_raw.h trigger.h \
+	  pathnames.h pcaputil.h record.h tcp_raw.h trigger.h \
 	  version.h vroot.h
 
-SRCS	= asn1.c base64.c buf.c hex.c magic.c mount.c pcaputil.c rpc.c \
+SRCS	= asn1.c base64.c buf.c hex.c magic.c pcaputil.c \
 	  tcp_raw.c trigger.c record.c dsniff.c decode.c decode_aim.c \
 	  decode_citrix.c decode_cvs.c decode_ftp.c decode_hex.c \
 	  decode_http.c decode_icq.c decode_imap.c decode_irc.c \
-	  decode_ldap.c decode_mmxp.c decode_mountd.c decode_napster.c \
+	  decode_ldap.c decode_mmxp.c decode_napster.c \
 	  decode_nntp.c decode_oracle.c decode_ospf.c decode_pcanywhere.c \
-	  decode_pop.c decode_portmap.c decode_postgresql.c decode_pptp.c \
+	  decode_pop.c decode_postgresql.c decode_pptp.c \
 	  decode_rip.c decode_rlogin.c decode_smb.c decode_smtp.c \
 	  decode_sniffer.c decode_snmp.c decode_socks.c decode_tds.c \
-	  decode_telnet.c decode_vrrp.c decode_yp.c decode_x11.c
-
-GEN	= mount.h mount.c nfs_prot.h nfs_prot.c
+	  decode_telnet.c decode_vrrp.c decode_x11.c
 
 OBJS	= $(SRCS:.c=.o)
 
 LIBOBJS	= dummy.o @LIBOBJS@
 
-PROGS	= arpspoof dnsspoof dsniff filesnarf macof mailsnarf msgsnarf \
-	  sshmitm sshow tcpkill tcpnice @TCPHIJACK@ urlsnarf webmitm @WEBSPY@ 
+PROGS	= arpspoof dnsspoof dsniff macof mailsnarf msgsnarf \
+	  sshow tcpkill tcpnice @TCPHIJACK@ urlsnarf webmitm @WEBSPY@ 
 
 CONFIGS	= dsniff.magic dsniff.services dnsspoof.hosts
 
@@ -77,14 +75,6 @@
 
 all: libmissing.a $(PROGS)
 
-mount.c: mount.x
-	rpcgen -h mount.x -o mount.h
-	rpcgen -c mount.x -o mount.c
-
-nfs_prot.c: nfs_prot.x
-	rpcgen -h nfs_prot.x -o nfs_prot.h
-	rpcgen -c nfs_prot.x -o nfs_prot.c
-
 $(LIBOBJS):
 	$(CC) $(CFLAGS) $(INCS) -c $(srcdir)/missing/$*.c
 
--- dsniff-2.4.org/decode.c	2014-08-13 00:44:31.073293717 +0200
+++ dsniff-2.4/decode.c	2014-08-13 01:55:45.228300475 +0200
@@ -53,6 +53,12 @@
 extern int decode_vrrp(u_char *, int, u_char *, int);
 extern int decode_ypserv(u_char *, int, u_char *, int);
 extern int decode_yppasswd(u_char *, int, u_char *, int);
+#ifndef HAVE_RPC
+int decode_portmap(u_char *a, int d, u_char *b, int c) {return 0;}
+int decode_mountd(u_char *a, int d, u_char *b, int c) {return 0;}
+int decode_ypserv(u_char *a, int d, u_char *b, int c) {return 0;}
+int decode_yppasswd(u_char *a, int d, u_char *b, int c) {return 0;}
+#endif
 
 static struct decode decodes[] = {
 	{ "hex",	decode_hex },