From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Dec 19 21:50:02 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC33F16A418 for ; Wed, 19 Dec 2007 21:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A65E713C4EA for ; Wed, 19 Dec 2007 21:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id lBJLo2Mc094555 for ; Wed, 19 Dec 2007 21:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id lBJLo2sb094554; Wed, 19 Dec 2007 21:50:02 GMT (envelope-from gnats) Resent-Date: Wed, 19 Dec 2007 21:50:02 GMT Resent-Message-Id: <200712192150.lBJLo2sb094554@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Paul Schmehl Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 746FB16A474 for ; Wed, 19 Dec 2007 21:48:19 +0000 (UTC) (envelope-from root+buttercup3@utdallas.edu) Received: from smtp2.utdallas.edu (smtp2.utdallas.edu [129.110.10.33]) by mx1.freebsd.org (Postfix) with ESMTP id 6404D13C4DB for ; Wed, 19 Dec 2007 21:48:19 +0000 (UTC) (envelope-from root+buttercup3@utdallas.edu) Received: from buttercup3.utdallas.edu (buttercup3.utdallas.edu [10.110.4.93]) by smtp2.utdallas.edu (Postfix) with ESMTP id F0C0A5C65F for ; Wed, 19 Dec 2007 15:28:46 -0600 (CST) Received: by buttercup3.utdallas.edu (Postfix, from userid 0) id E0155621C1A; Wed, 19 Dec 2007 21:28:52 +0000 (UTC) Message-Id: <20071219212852.E0155621C1A@buttercup3.utdallas.edu> Date: Wed, 19 Dec 2007 21:28:52 +0000 (UTC) From: Paul Schmehl To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/118873: security/barnyard, update port for 64 bit systems X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Schmehl List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2007 21:50:02 -0000 >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@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 #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__ */ --- 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: