summaryrefslogtreecommitdiff
path: root/security/labrea
diff options
context:
space:
mode:
authorYen-Ming Lee <leeym@FreeBSD.org>2003-06-14 03:53:27 +0000
committerYen-Ming Lee <leeym@FreeBSD.org>2003-06-14 03:53:27 +0000
commit3eb9ccd2ab7ea4fc61bb549999e21f318ede259d (patch)
tree9df5480050e8fef40f57e5880ee15ae0c9d288a6 /security/labrea
parentUpdate to 0.1.3. (diff)
update to LaBrea-2.4
PR: 53267 Submitted by: Nick Rogness <nick@rogness.net>
Notes
Notes: svn path=/head/; revision=82969
Diffstat (limited to 'security/labrea')
-rw-r--r--security/labrea/Makefile17
-rw-r--r--security/labrea/distinfo2
-rw-r--r--security/labrea/files/patch-Data.c52
-rw-r--r--security/labrea/files/patch-Makefile77
4 files changed, 113 insertions, 35 deletions
diff --git a/security/labrea/Makefile b/security/labrea/Makefile
index b2f34edc8927..51f9271ce104 100644
--- a/security/labrea/Makefile
+++ b/security/labrea/Makefile
@@ -6,29 +6,26 @@
##
PORTNAME= LaBrea
-PORTVERSION= 2.3
+PORTVERSION= 2.4
CATEGORIES= security
MASTER_SITES= http://freebsd.rogness.net/ports/labrea/
-DISTNAME= LaBrea${PORTVERSION:S/./_/g}
+DISTNAME= ${PORTNAME}${PORTVERSION:S/./_/g}
EXTRACT_SUFX= .tgz
MAINTAINER= nick@rogness.net
-COMMENT= Defense mechanism against CodeRed
+COMMENT= Security tarpit defense tool
BUILD_DEPENDS= ${LOCALBASE}/lib/libnet.a:${PORTSDIR}/net/libnet
-WRKSRC= ${WRKDIR}/LaBrea
-USE_REINPLACE= yes
-
-MAKE_ARGS= CC="${CC}" OPTFLAGS="${CFLAGS}"
+ALL_TARGET= ${PORTNAME}
post-install:
.if !defined(NOPORTDOCS)
- ${MKDIR} ${PREFIX}/share/doc/LaBrea
- ${INSTALL_MAN} ${WRKSRC}/LaBrea.README ${PREFIX}/share/doc/LaBrea
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_MAN} ${WRKSRC}/LaBrea.README ${DOCSDIR}
@echo "******************************************"
@echo "You will need to read the LaBrea.README in"
- @echo "${PREFIX}/share/doc/LaBrea"
+ @echo "${DOCSDIR}"
@echo "Before your run this!!"
@echo "******************************************"
@echo .
diff --git a/security/labrea/distinfo b/security/labrea/distinfo
index 184fda61c2cb..bfe43d9c25d2 100644
--- a/security/labrea/distinfo
+++ b/security/labrea/distinfo
@@ -1 +1 @@
-MD5 (LaBrea2_3.tgz) = ca73a56d99a4bc50917ff56f04fdbc9b
+MD5 (LaBrea2_4.tgz) = 75dda18a9ad6f1e9195da2ac1e57888d
diff --git a/security/labrea/files/patch-Data.c b/security/labrea/files/patch-Data.c
new file mode 100644
index 000000000000..624349f19ebe
--- /dev/null
+++ b/security/labrea/files/patch-Data.c
@@ -0,0 +1,52 @@
+--- Data.c.orig Tue Feb 11 01:04:04 2003
++++ Data.c Sat Jun 14 11:39:04 2003
+@@ -22,3 +22,6 @@
++#ifndef CONFIG_PATH
++#define COFNIG_PATH "/etc"
++#endif
+ #ifdef OLDSTYLE
+ #ifdef WIN32
+ char HardExcludeName[] = "LaBreaHardExclude.cfg";
+@@ -30,14 +33,14 @@
+ char IgnorePortName[] = "LaBreaIgnorePort.cfg";
+ char IgnorePortNotFound[] = "LaBreaIgnorePort.cfg not found - nothing to ignore";
+ #else
+-char HardExcludeName[] = "/etc/LaBreaHardExclude";
+-char HardExcludeNotFound[] = "/etc/LaBreaHardExclude not found - no hard exclusions";
+-char IgnoreName[] = "/etc/LaBreaIgnoreIP";
+-char IgnoreNotFound[] = "/etc/LaBreaIgnoreIP not found - nothing to ignore";
+-char ExcludeName[] = "/etc/LaBreaExclude";
+-char ExcludeNotFound[] = "/etc/LaBreaExclude not found - no hard exclusions";
+-char IgnorePortName[] = "/etc/LaBreaIgnorePort";
+-char IgnorePortNotFound[] = "/etc/LaBreaIgnorePort not found - nothing to ignore";
++char HardExcludeName[] = CONFIG_PATH"/LaBreaHardExclude";
++char HardExcludeNotFound[] = CONFIG_PATH"/LaBreaHardExclude not found - no hard exclusions";
++char IgnoreName[] = CONFIG_PATH"/LaBreaIgnoreIP";
++char IgnoreNotFound[] = CONFIG_PATH"/LaBreaIgnoreIP not found - nothing to ignore";
++char ExcludeName[] = CONFIG_PATH"/LaBreaExclude";
++char ExcludeNotFound[] = CONFIG_PATH"/LaBreaExclude not found - no hard exclusions";
++char IgnorePortName[] = CONFIG_PATH"/LaBreaIgnorePort";
++char IgnorePortNotFound[] = CONFIG_PATH"/LaBreaIgnorePort not found - nothing to ignore";
+ #endif /* WIN32 */
+ char format3[] = "Exclude: %i.%i.%i.%i\n";
+ char format4[] = "HardExclude: %i.%i.%i.%i\n";
+@@ -46,8 +49,8 @@
+ char ConfigName[] = "LaBrea.cfg";
+ char ConfigNotFound[] = "LaBrea.cfg not found";
+ #else
+-char ConfigName[] = "/etc/LaBreaConfig";
+-char ConfigNotFound[] = "/etc/LaBreaConfig not found";
++char ConfigName[] = CONFIG_PATH"/LaBreaConfig";
++char ConfigNotFound[] = CONFIG_PATH"/LaBreaConfig not found";
+ #endif /* WIN32 */
+ #endif /* OLDSTYLE */
+
+@@ -127,7 +130,7 @@
+ char err17[] = "Invalid or missing interface!\n";
+ char getoptstr[] = "HXPoOdTRqr:i:t:lvVxs?hzap:bE:I:Dfj";
+ #else
+-char strRandFileName[] = "/etc/LaBreaRandom";
++char strRandFileName[] = CONFIG_PATH"/LaBreaRandom";
+ char err18[] = "User specified netmask: %s\nUser specified network number: %s\n";
+ char getoptstr[] = "HXPoOdTRqF:r:i:t:lvVxsn:m:?hzap:bfj";
+ #endif
diff --git a/security/labrea/files/patch-Makefile b/security/labrea/files/patch-Makefile
index 33a18e426530..e6a231a73390 100644
--- a/security/labrea/files/patch-Makefile
+++ b/security/labrea/files/patch-Makefile
@@ -1,24 +1,53 @@
---- Makefile Tue Oct 2 12:00:00 2001
-+++ Makefile.new Wed Dec 19 03:03:27 2001
-@@ -5,12 +5,17 @@
- #OPTFLAGS = -g
- CC = gcc
- CFLAGS = -Wall `libnet-config --defines` $(OPTFLAGS) $(INCLUDES)
--LDLIBS = `libnet-config --libs` -lpcap
--INCLUDES = -I/usr/include/pcap
-+LOCALBASE=/usr/local
-+PREFIX=/usr/local
-+LDLIBS = `libnet-config --libs` -L$(LOCALBASE)/lib -lpcap
-+INCLUDES = -I$(LOCALBASE)/include
-
--LaBrea: LaBrea.o
-+LaBrea: LaBrea.c
-
--LaBrea.o: LaBrea.c
-+#LaBrea.o: LaBrea.c
-
- clean:
- rm -f *.o core LaBrea
-+
-+install:
-+ @install -c -g wheel -o root -m 755 LaBrea $(PREFIX)/bin
+*** Makefile Wed Feb 20 09:27:56 2002
+--- Makefile.new Wed Jun 11 18:10:47 2003
+***************
+*** 4,17 ****
+ -mcpu=i686 -fexpensive-optimizations -fomit-frame-pointer
+ #OPTFLAGS = -g
+ CC = gcc
+! CFLAGS = -Wall `libnet-config --defines` $(OPTFLAGS) $(INCLUDES)
+ LDLIBS = `libnet-config --libs` -lpcap
+! LDFLAGS = -s
+! INCLUDES = -I/usr/include/pcap
+!
+! LaBrea: LaBrea.o CleanExit.o FixArrays.o GoDaemon.o \
+! PacketHandler.o ServiceTimer.o ToggleLogging.o
+
+ LaBrea.o: LaBrea.c labrea.h defines.h
+ CleanExit.o: CleanExit.c labrea.h defines.h
+ FixArrays.o: FixArrays.c labrea.h defines.h
+--- 4,17 ----
+ -mcpu=i686 -fexpensive-optimizations -fomit-frame-pointer
+ #OPTFLAGS = -g
+ CC = gcc
+! CFLAGS = -Wall `libnet-config --defines` -DCONFIG_PATH=\"/usr/local/etc\" $(OPTFLAGS) $(INCLUDES)
+ LDLIBS = `libnet-config --libs` -lpcap
+! LDFLAGS = -s -L/usr/local/lib
+! INCLUDES = -I/usr/include/pcap -I/usr/local/include
+! FILES = LaBrea.o CleanExit.o FixArrays.o GoDaemon.o PacketHandler.o ServiceTimer.o ToggleLogging.o
+
++ LaBrea: $(FILES)
++
+ LaBrea.o: LaBrea.c labrea.h defines.h
+ CleanExit.o: CleanExit.c labrea.h defines.h
+ FixArrays.o: FixArrays.c labrea.h defines.h
+***************
+*** 20,26 ****
+ ServiceTimer.o: ServiceTimer.c labrea.h defines.h
+ ToggleLogging.o: ToggleLogging.c labrea.h defines.h
+
+ clean:
+ rm -f *.o core LaBrea
+-
+
+--- 20,29 ----
+ ServiceTimer.o: ServiceTimer.c labrea.h defines.h
+ ToggleLogging.o: ToggleLogging.c labrea.h defines.h
+
++ install:
++ $(CC) -o LaBrea $(FILES) $(LDFLAGS) $(LDLIBS)
++ $(INSTALL) -c -o root -g wheel LaBrea /usr/local/bin
++
+ clean:
+ rm -f *.o core LaBrea
+