ports/118873: security/barnyard, update port for 64 bit systems
Paul Schmehl
pauls at utdallas.edu
Wed Dec 19 21:50:02 UTC 2007
>Number: 118873
>Category: ports
>Synopsis: security/barnyard, update port for 64 bit systems
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Wed Dec 19 21:50:02 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Paul Schmehl
>Release: FreeBSD 6.2-RELEASE-p9 amd64
>Organization:
The University of Texas at Dallas
>Environment:
System: FreeBSD hostname.utdallas.edu 6.2-RELEASE-p9 FreeBSD 6.2-RELEASE-p9 #0: Wed Dec 12 22:53:08 UTC 2007 root at hostname.utdallas.edu:/usr/obj/usr/src/sys/SMP amd64
>Description:
increments PORTREVISION and adds section to patch for 64 bit OSes,
including five patches added to ${FILESDIR}, also sets flag for mysql
knob to "on", since that is always the default anyway
>How-To-Repeat:
>Fix:
--- patch-Makefile begins here ---
--- Makefile.orig Wed Dec 19 15:46:40 2007
+++ Makefile Wed Dec 19 19:34:33 2007
@@ -7,7 +7,7 @@
PORTNAME= barnyard
PORTVERSION= 0.2.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= barnyard
@@ -17,7 +17,7 @@
RUN_DEPENDS+= ${LOCALBASE}/bin/snort:${PORTSDIR}/security/snort
-OPTIONS= MYSQL "Enable MySQL support" off \
+OPTIONS= MYSQL "Enable MySQL support" on \
POSTGRESQL "Enable PostgreSQL support" off
USE_AUTOTOOLS= autoheader:261 aclocal:19
@@ -41,6 +41,14 @@
.if defined(WITH_POSTGRESQL)
USE_PGSQL= yes
CONFIGURE_ARGS+= --enable-postgres
+.endif
+
+.if ${ARCH} == "amd64" || ${ARCH} =="ia64" || ${ARCH} == "sparc64"
+EXTRA_PATCHES+= ${FILESDIR}/64-bit-barnyard.h \
+ ${FILESDIR}/64-bit-input-plugins-dp-alert.h \
+ ${FILESDIR}/64-bit-util.h \
+ ${FILESDIR}/64-bit-event.h \
+ ${FILESDIR}/64-bit-util.c
.endif
post-install:
--- patch-Makefile ends here ---
--- 64-bit-barnyard.h begins here ---
--- src/barnyard.h 2004-05-01 12:43:29.000000000 -0400
+++ src/barnyard.h 2007-08-11 23:22:53.000000000 -0400
@@ -34,7 +34,8 @@
typedef struct _SnortPktHeader
{
- struct timeval ts; /* packet timestamp */
+ // struct timeval ts; /* packet timestamp */
+ struct pcap_timeval ts; /* packet timestamp */
u_int32_t caplen; /* packet capture length */
u_int32_t pktlen; /* packet "real" length */
} SnortPktHeader;
--- 64-bit-barnyard.h ends here ---
--- 64-bit-event.h begins here ---
--- src/event.h 2003-05-02 22:44:12.000000000 -0400
+++ src/event.h 2007-08-12 00:13:44.000000000 -0400
@@ -19,6 +19,11 @@
#include <sys/types.h>
#include <sys/time.h>
+struct pcap_timeval {
+ u_int32_t tv_sec; /* seconds */
+ u_int32_t tv_usec; /* microseconds */
+};
+
typedef struct _Event
{
u_int32_t sig_generator; /* which part of snort generated the alert? */
@@ -30,6 +35,7 @@
u_int32_t event_reference; /* reference to other events that have gone off,
* such as in the case of tagged packets...
*/
- struct timeval ref_time; /* reference time for the event reference */
+ // struct timeval ref_time; /* reference time for the event reference */
+ struct pcap_timeval ref_time; /* reference time for the event reference */
} Event;
#endif /* __EVENT_H__ */
--- 64-bit-event.h ends here ---
--- 64-bit-input-plugins-dp-alert.h begins here ---
--- src/input-plugins/dp_alert.h 2004-02-19 20:59:48.000000000 -0500
+++ src/input-plugins/dp_alert.h 2007-08-11 23:24:25.000000000 -0400
@@ -34,7 +34,8 @@
typedef struct _UnifiedAlertRecord
{
Event event;
- struct timeval ts; /* event timestamp */
+ // struct timeval ts; /* event timestamp */
+ struct pcap_timeval ts; /* event timestamp */
u_int32_t sip; /* src ip */
u_int32_t dip; /* dest ip */
u_int16_t sp; /* src port */
--- 64-bit-input-plugins-dp-alert.h ends here ---
--- 64-bit-util.c begins here ---
--- src/util.c 2004-03-06 17:30:15.000000000 -0500
+++ src/util.c 2007-08-12 00:14:52.000000000 -0400
@@ -514,7 +514,8 @@
static char tmpbuf[256];
-int RenderTimeval(struct timeval *tv, char *timebuf, size_t len)
+// int RenderTimeval(struct timeval *tv, char *timebuf, size_t len)
+int RenderTimeval(struct pcap_timeval *tv, char *timebuf, size_t len)
{
struct tm *lt;
time_t timet;
--- 64-bit-util.c ends here ---
--- 64-bit-util.h begins here ---
--- src/util.h 2004-03-06 19:23:50.000000000 -0500
+++ src/util.h 2007-08-11 23:23:46.000000000 -0400
@@ -39,7 +39,8 @@
void ClearDumpBuf();
void GoDaemon();
size_t RenderTimestamp(time_t timet, char *timebuf, size_t len);
-int RenderTimeval(struct timeval *tv, char *timebuf, size_t len);
+// int RenderTimeval(struct timeval *tv, char *timebuf, size_t len);
+int RenderTimeval(struct pcap_timeval *tv, char *timebuf, size_t len);
int CreatePidFile(char *filename);
int String2Long(char *string, long *result);
int String2ULong(char *string, unsigned long *result);
--- 64-bit-util.h ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list