diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2008-01-04 12:48:37 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2008-01-04 12:48:37 +0000 |
commit | affb1ff4f4e10620e0649fea3163734ce5aca72f (patch) | |
tree | 5a3964601b6cf45bf6b228846b71fcf583be643a /security/barnyard | |
parent | e120719ae7e3e38c6b0b0c36805dbf5317e1f56b (diff) | |
download | ports-affb1ff4f4e10620e0649fea3163734ce5aca72f.tar.gz ports-affb1ff4f4e10620e0649fea3163734ce5aca72f.zip |
- Patches for 64-bit systems
- Toggle MySQL option to default to 'on'
PR: ports/118873
Submitted by: Paul Schmehl <pauls@utdallas.edu> (maintainer)
Notes
Notes:
svn path=/head/; revision=204981
Diffstat (limited to 'security/barnyard')
-rw-r--r-- | security/barnyard/Makefile | 12 | ||||
-rw-r--r-- | security/barnyard/files/64-bit-barnyard.h | 12 | ||||
-rw-r--r-- | security/barnyard/files/64-bit-event.h | 23 | ||||
-rw-r--r-- | security/barnyard/files/64-bit-input-plugins-dp-alert.h | 12 | ||||
-rw-r--r-- | security/barnyard/files/64-bit-util.c | 12 | ||||
-rw-r--r-- | security/barnyard/files/64-bit-util.h | 12 |
6 files changed, 81 insertions, 2 deletions
diff --git a/security/barnyard/Makefile b/security/barnyard/Makefile index 08246b8fa412..ddb37d8abda3 100644 --- a/security/barnyard/Makefile +++ b/security/barnyard/Makefile @@ -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 @@ COMMENT?= An output system for Snort 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 @@ -43,6 +43,14 @@ 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: .for f in barnyard.conf diff --git a/security/barnyard/files/64-bit-barnyard.h b/security/barnyard/files/64-bit-barnyard.h new file mode 100644 index 000000000000..526ab6a3a405 --- /dev/null +++ b/security/barnyard/files/64-bit-barnyard.h @@ -0,0 +1,12 @@ +--- 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; diff --git a/security/barnyard/files/64-bit-event.h b/security/barnyard/files/64-bit-event.h new file mode 100644 index 000000000000..1a0051fb2116 --- /dev/null +++ b/security/barnyard/files/64-bit-event.h @@ -0,0 +1,23 @@ +--- 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__ */ diff --git a/security/barnyard/files/64-bit-input-plugins-dp-alert.h b/security/barnyard/files/64-bit-input-plugins-dp-alert.h new file mode 100644 index 000000000000..f80c7d6efd66 --- /dev/null +++ b/security/barnyard/files/64-bit-input-plugins-dp-alert.h @@ -0,0 +1,12 @@ +--- 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 */ diff --git a/security/barnyard/files/64-bit-util.c b/security/barnyard/files/64-bit-util.c new file mode 100644 index 000000000000..805c2f3f322e --- /dev/null +++ b/security/barnyard/files/64-bit-util.c @@ -0,0 +1,12 @@ +--- 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; diff --git a/security/barnyard/files/64-bit-util.h b/security/barnyard/files/64-bit-util.h new file mode 100644 index 000000000000..8109ad11ca3f --- /dev/null +++ b/security/barnyard/files/64-bit-util.h @@ -0,0 +1,12 @@ +--- 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); |