diff options
author | Aron Griffis <agriffis@gentoo.org> | 2003-03-29 16:13:54 +0000 |
---|---|---|
committer | Aron Griffis <agriffis@gentoo.org> | 2003-03-29 16:13:54 +0000 |
commit | 24f047affbb0c6a988ab9e744654ac71bf27d6e9 (patch) | |
tree | 730dd4a582913c4d8318a97e9d08f06e21318751 | |
parent | Version bump as unstable (diff) | |
download | historical-24f047affbb0c6a988ab9e744654ac71bf27d6e9.tar.gz historical-24f047affbb0c6a988ab9e744654ac71bf27d6e9.tar.bz2 historical-24f047affbb0c6a988ab9e744654ac71bf27d6e9.zip |
add alpha and fix bug #18258
-rw-r--r-- | net-analyzer/snort/ChangeLog | 9 | ||||
-rw-r--r-- | net-analyzer/snort/files/digest-snort-1.9.1-r1 | 1 | ||||
-rw-r--r-- | net-analyzer/snort/files/snort-1.9.1-alpha.patch | 46 | ||||
-rw-r--r-- | net-analyzer/snort/snort-1.9.1-r1.ebuild | 107 |
4 files changed, 162 insertions, 1 deletions
diff --git a/net-analyzer/snort/ChangeLog b/net-analyzer/snort/ChangeLog index 0860a523a500..9d2aead69bcd 100644 --- a/net-analyzer/snort/ChangeLog +++ b/net-analyzer/snort/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-analyzer/snort # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/ChangeLog,v 1.11 2003/03/04 11:05:42 aliz Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/ChangeLog,v 1.12 2003/03/29 16:13:54 agriffis Exp $ + +*snort-1.9.1-r1 (29 Mar 2003) + + 29 Mar 2003; Aron Griffis <agriffis@gentoo.org> snort-1.9.1-r1.ebuild, + files/snort-1.9.1-alpha.patch: + Add patch and bump revision for alpha. Thanks to Tavis Ormandy for providing + this in bug #18258 *snort-1.9.1 (04 Mar 2003) diff --git a/net-analyzer/snort/files/digest-snort-1.9.1-r1 b/net-analyzer/snort/files/digest-snort-1.9.1-r1 new file mode 100644 index 000000000000..33016cb62406 --- /dev/null +++ b/net-analyzer/snort/files/digest-snort-1.9.1-r1 @@ -0,0 +1 @@ +MD5 50bb526b41f48fb7689bb8342b27e44d snort-1.9.1.tar.gz 146615 diff --git a/net-analyzer/snort/files/snort-1.9.1-alpha.patch b/net-analyzer/snort/files/snort-1.9.1-alpha.patch new file mode 100644 index 000000000000..b8b7b2fccb0b --- /dev/null +++ b/net-analyzer/snort/files/snort-1.9.1-alpha.patch @@ -0,0 +1,46 @@ +diff -ur --minimal snort-1.9.1.orig/src/preprocessors/spp_http_decode.c snort-1.9.1/src/preprocessors/spp_http_decode.c +--- snort-1.9.1.orig/src/preprocessors/spp_http_decode.c 2003-02-23 22:46:04.000000000 +0000 ++++ snort-1.9.1/src/preprocessors/spp_http_decode.c 2003-03-26 22:36:33.000000000 +0000 +@@ -444,11 +444,11 @@ + psize = (u_int16_t) (p->dsize); + + /* first skip past the HTTP method */ +- while(index < end && !lookup_whitespace[(u_int)(*index)]) ++ while(index < end && !lookup_whitespace[(u_char)(*index)]) + index++; + + /* skip over whitespace seperator */ +- while(index < end && lookup_whitespace[(u_int)(*index)]) ++ while(index < end && lookup_whitespace[(u_char)(*index)]) + index++; + + /* evilness check */ +@@ -562,8 +562,8 @@ + "Double hex encoding received\n");); + } + +- hex1=lookup_hexvalue[(u_int)(*(index+1))]; +- hex2=lookup_hexvalue[(u_int)(*(index+2))]; ++ hex1=lookup_hexvalue[(u_char)(*(index+1))]; ++ hex2=lookup_hexvalue[(u_char)(*(index+2))]; + + if(hex1 != -1 && hex2 != -1) + { +@@ -612,7 +612,7 @@ + } + + } +- else if(lookup_whitespace[(u_int)(*index)]) ++ else if(lookup_whitespace[(u_char)(*index)]) + { + /* we've reached the delimiting whitespace */ + /* UriBufs[0].http_version = (u_int8_t *) index; */ +@@ -629,7 +629,7 @@ + while(index < end && + ((cur - (char *) UriBufs[0].uri) < URI_LENGTH)) + { +- if(lookup_whitespace[(u_int)(*index)]) ++ if(lookup_whitespace[(u_char)(*index)]) + { + /* we've reached the delimiting whitespace */ + /* Time to get HTTP version? */ diff --git a/net-analyzer/snort/snort-1.9.1-r1.ebuild b/net-analyzer/snort/snort-1.9.1-r1.ebuild new file mode 100644 index 000000000000..c5aa98387d3a --- /dev/null +++ b/net-analyzer/snort/snort-1.9.1-r1.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snort/snort-1.9.1-r1.ebuild,v 1.1 2003/03/29 16:13:54 agriffis Exp $ + +inherit eutils + +IUSE="ssl postgres mysql snmp" +S=${WORKDIR}/${P} +DESCRIPTION="Libpcap-based packet sniffer/logger/lightweight IDS" +SRC_URI="http://www.snort.org/dl/${P}.tar.gz" +HOMEPAGE="http://www.snort.org" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="x86 sparc alpha" + +DEPEND="virtual/glibc + >=net-libs/libpcap-0.6.2-r1 + ~net-libs/libnet-1.0.2a + postgres? ( >=dev-db/postgresql-7.2 ) + mysql? ( >=dev-db/mysql-3.23.26 ) + ssl? ( >=dev-libs/openssl-0.9.6b ) + snmp? ( >=net-analyzer/net-snmp-5.0 )" + +RDEPEND="virtual/glibc + dev-lang/perl + >=net-libs/libpcap-0.6.2-r1 + postgres? ( >=dev-db/postgresql-7.2 ) + mysql? ( >=dev-db/mysql-3.23.26 ) + ssl? ( >=dev-libs/openssl-0.9.6b )" + +src_unpack() { + unpack ${A} + + cd ${S} + epatch ${FILESDIR}/${P}-configure.patch + + # Following patch contributed in bug #18258 + use alpha && epatch ${FILESDIR}/${P}-alpha.patch +} + +src_compile() { + + local myconf + + use postgres && myconf="${myconf} --with-postgresql" \ + || myconf="${myconf} --without-postgresql" + use mysql && myconf="${myconf} --with-mysql" \ + || myconf="${myconf} --without-mysql" + use ssl && myconf="${myconf} --with-openssl" \ + || myconf="${myconf} --without-openssl" + use snmp && myconf="${myconf} --with-snmp" \ + || myconf="${myconf} --without-snmp" + + + ./configure \ + --prefix=/usr \ + --without-odbc \ + --without-oracle \ + --enable-pthreads \ + --enable-flexresp \ + --enable-smbalerts \ + --mandir=/usr/share/man \ + --host=${CHOST} ${myconf} || die "bad ./configure" + + emake || die "compile problem" +} + +src_install () { + + make DESTDIR=${D} install || die + + dodir /var/log/snort + touch ${D}/var/log/snort/.keep + + insinto /usr/lib/snort/bin + doins contrib/{create_mysql,snortlog,*.pl} + + dodoc COPYING LICENSE doc/* + docinto contrib ; dodoc contrib/* + + insinto /etc/snort + doins etc/classification.config rules/*.rules + newins etc/snort.conf snort.conf.distrib + + exeinto /etc/init.d ; newexe ${FILESDIR}/snort.rc6 snort + insinto /etc/conf.d ; newins ${FILESDIR}/snort.confd snort +} + +pkg_postinst() { + + if ! grep -q ^snort: /etc/group ; then + groupadd snort || die "problem adding group snort" + fi + if ! grep -q ^snort: /etc/passwd ; then + useradd -g snort -s /dev/null -d /var/log/snort -c "snort" snort + assert "problem adding user snort" + fi + usermod -c "snort" snort || die "usermod problem" + usermod -d "/var/log/snort" snort || die "usermod problem" + usermod -g "snort" snort || die "usermod problem" + usermod -s "/dev/null" snort || die "usermod problem" + echo "ignore any message about CREATE_HOME above..." + + chown snort.snort /var/log/snort + chmod 0770 /var/log/snort +} |