From 56bd759df1d0c750a065b8c845e93d5dfa6b549d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 8 Aug 2015 13:49:04 -0700 Subject: proj/gentoo: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson X-Thanks: Alec Warner - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring - wrote much python to improve cvs2svn X-Thanks: Rich Freeman - validation scripts X-Thanks: Patrick Lauer - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed --- net-analyzer/barnyard/files/barnyard.64bit.diff | 81 +++++++++++++++++++++++++ net-analyzer/barnyard/files/barnyard.confd | 19 ++++++ net-analyzer/barnyard/files/barnyard.rc6 | 30 +++++++++ 3 files changed, 130 insertions(+) create mode 100644 net-analyzer/barnyard/files/barnyard.64bit.diff create mode 100644 net-analyzer/barnyard/files/barnyard.confd create mode 100644 net-analyzer/barnyard/files/barnyard.rc6 (limited to 'net-analyzer/barnyard/files') diff --git a/net-analyzer/barnyard/files/barnyard.64bit.diff b/net-analyzer/barnyard/files/barnyard.64bit.diff new file mode 100644 index 00000000000..f338d291ff1 --- /dev/null +++ b/net-analyzer/barnyard/files/barnyard.64bit.diff @@ -0,0 +1,81 @@ +diff -ur barnyard-0.2.0/src/barnyard.h barnyard-0.2.0.64bit/src/barnyard.h +--- barnyard-0.2.0/src/barnyard.h 2004-05-01 12:43:29.000000000 -0400 ++++ barnyard-0.2.0.64bit/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; +Only in barnyard-0.2.0.64bit/src: barnyard.h~ +diff -ur barnyard-0.2.0/src/event.h barnyard-0.2.0.64bit/src/event.h +--- barnyard-0.2.0/src/event.h 2003-05-02 22:44:12.000000000 -0400 ++++ barnyard-0.2.0.64bit/src/event.h 2007-08-12 00:13:44.000000000 -0400 +@@ -19,6 +19,11 @@ + #include + #include + ++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__ */ +Only in barnyard-0.2.0.64bit/src: event.h~ +diff -ur barnyard-0.2.0/src/input-plugins/dp_alert.h barnyard-0.2.0.64bit/src/input-plugins/dp_alert.h +--- barnyard-0.2.0/src/input-plugins/dp_alert.h 2004-02-19 20:59:48.000000000 -0500 ++++ barnyard-0.2.0.64bit/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 */ +Only in barnyard-0.2.0.64bit/src/input-plugins: dp_alert.h~ +diff -ur barnyard-0.2.0/src/util.c barnyard-0.2.0.64bit/src/util.c +--- barnyard-0.2.0/src/util.c 2004-03-06 17:30:15.000000000 -0500 ++++ barnyard-0.2.0.64bit/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; +Only in barnyard-0.2.0.64bit/src: util.c~ +diff -ur barnyard-0.2.0/src/util.h barnyard-0.2.0.64bit/src/util.h +--- barnyard-0.2.0/src/util.h 2004-03-06 19:23:50.000000000 -0500 ++++ barnyard-0.2.0.64bit/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); +Only in barnyard-0.2.0.64bit/src: util.h~ diff --git a/net-analyzer/barnyard/files/barnyard.confd b/net-analyzer/barnyard/files/barnyard.confd new file mode 100644 index 00000000000..be0013cb1fe --- /dev/null +++ b/net-analyzer/barnyard/files/barnyard.confd @@ -0,0 +1,19 @@ +# Config file for /etc/init.d/barnyard +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PIDFILE="/var/run/barnyard.pid" +LOG_FILE="snort_unified.log" + +# You probably don't want to change this, but in case you do +LOGDIR="/var/log/snort" +ARCHIVEDIR="$LOGDIR/archive" +GENMSG_FILE="/etc/snort/gen-msg.map" +SIDMSG_FILE="/etc/snort/sid-msg.map" +WALDO_FILE="$LOGDIR/barnyard.waldo" + +# Probably not this either +CONF=/etc/snort/barnyard.conf + +# This pulls in the options above +BARNYARD_OPTS="-D -c $CONF -d $LOGDIR -g $GENMSG_FILE -s $SIDMSG_FILE -w $WALDO_FILE -L $LOGDIR -a $ARCHIVEDIR -f $LOG_FILE -X $PIDFILE" diff --git a/net-analyzer/barnyard/files/barnyard.rc6 b/net-analyzer/barnyard/files/barnyard.rc6 new file mode 100644 index 00000000000..15471aa6202 --- /dev/null +++ b/net-analyzer/barnyard/files/barnyard.rc6 @@ -0,0 +1,30 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net +} + +checkconfig() { + if [ ! -e $CONF ] ; then + eerror "You need a configuration file to run barnyard" + eerror "There is an example config in /etc/snort/barnyard.conf.distrib" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting barnyard" + start-stop-daemon --start --quiet --exec /usr/bin/barnyard \ + -- ${BARNYARD_OPTS} >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping barnyard" + start-stop-daemon --stop --quiet --pidfile ${PIDFILE} + eend $? +} -- cgit v1.2.1