restore patches

This commit is contained in:
naddy 2007-11-03 15:25:38 +00:00
parent 5702e27e39
commit 625b2d9b0b
3 changed files with 124 additions and 0 deletions

View File

@ -0,0 +1,58 @@
$OpenBSD: patch-Makefile,v 1.1 2007/11/03 15:25:38 naddy Exp $
--- Makefile.orig Sat Nov 3 16:24:16 2007
+++ Makefile Sat Nov 3 16:24:16 2007
@@ -2,15 +2,15 @@
# C compiler
#CC=cc
-CC=gcc
+#CC=gcc
# Uncomment the following to add symbols to the code for debugging
-DEBUG=-g -Wall
+#DEBUG=-g -Wall
#DEBUG=-D_DEBUG
# Optimization for the compiler
#OPTIMIZE=
-OPTIMIZE=-O2
+#OPTIMIZE=-O2
# Choose your architecture
# note that if you are on a big-endian machine like SUN's
@@ -18,9 +18,9 @@ OPTIMIZE=-O2
# the correct order yet. You're on your own right now.
#
# FreeBSD
-ARCH=-DMPU8086
-STATIC=
-XLIBS=
+#ARCH=-DMPU8086
+#STATIC=
+#XLIBS=
#
# SUNOS
#ARCH=-DBIGENDIAN
@@ -47,13 +47,18 @@ XLIBS=
#OPTIMIZE=
#XLIBS=
-CFLAGS= $(DEBUG) $(OPTIMIZE) $(ARCH) $(VISUAL) $(PERMUTE) $(STATIC)
+#CFLAGS= $(DEBUG) $(OPTIMIZE) $(ARCH) $(VISUAL) $(PERMUTE) $(STATIC)
-OBJS = des_enc.o ecb_enc.o llist.o md4.o util.o ztest.o set_key.o chal_resp.o
+OBJS = llist.o md4.o util.o ztest.o set_key.o chal_resp.o
+all: lc readsmb
+
lc: $(OBJS)
- $(CC) $(CFLAGS) $(XLIBS) -o lc_CLI $(OBJS)
+ $(CC) $(CFLAGS) $(XLIBS) -o lc $(OBJS) -ldes
+readsmb: readsmb.c
+ $(CC) -o $@ readsmb.c -lpcap
+
clean:
- rm -f core *.o lc_CLI
+ rm -f core *.o lc readsmb

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-includes_h,v 1.1 2007/11/03 15:25:38 naddy Exp $
--- includes.h.orig Sat Nov 3 16:24:16 2007
+++ includes.h Sat Nov 3 16:24:16 2007
@@ -1,9 +1,17 @@
#include "md4.h"
-#include "des.h"
+#include <des.h>
#include <memory.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
+#include <machine/endian.h>
+
+/* XXX */
+#if BYTE_ORDER == BIG_ENDIAN
+# define BIGENDIAN
+#else
+# define MPU8086
+#endif
typedef short int16;
typedef int int32;

View File

@ -0,0 +1,44 @@
$OpenBSD: patch-readsmb_c,v 1.1 2007/11/03 15:25:38 naddy Exp $
--- readsmb.c.orig Sat Nov 3 16:24:16 2007
+++ readsmb.c Sat Nov 3 16:24:16 2007
@@ -44,16 +44,17 @@ be
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <asm/signal.h>
-#ifdef __FreeBSD__
+#include <sys/param.h>
+#include <signal.h>
+#ifdef BSD
#include <sys/socket.h>
-#endif /* __FreeBSD__ */
+#endif /* BSD */
#ifdef __sun /* Solaris 2.x */
#define u_int32_t uint32_t
#include <sys/socket.h>
-#endif /* Not FreeBSD, not Solaris. Our default is Linux */
+#endif /* Not BSD, not Solaris. Our default is Linux */
#include <net/if.h>
-#include "pcap.h"
+#include <pcap.h>
#define FILTER_CMD "src port 139 or dst port 139"
#define TRUE (1)
@@ -86,7 +87,7 @@ eth0 */
int current_pkt_type = 0;
int neg_prot, pw_offset, sk_offset, user_offset;
-void *
+void
killed (int sig)
{
fflush (log);
@@ -330,7 +331,7 @@ num5, num6);
free (pc6);
return (lmhash);
}
-void
+int
main (int argc, char **argv)
{
char *cur_pkt, *next_pkt;