diff options
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/daemonlogger/ChangeLog | 8 | ||||
-rw-r--r-- | net-analyzer/daemonlogger/Manifest | 12 | ||||
-rw-r--r-- | net-analyzer/daemonlogger/daemonlogger-1.0.1.ebuild | 37 | ||||
-rw-r--r-- | net-analyzer/daemonlogger/daemonlogger-1.2.1.ebuild | 39 | ||||
-rw-r--r-- | net-analyzer/daemonlogger/files/daemonlogger-confd | 19 | ||||
-rw-r--r-- | net-analyzer/daemonlogger/files/daemonlogger-initd | 26 | ||||
-rw-r--r-- | net-analyzer/daemonlogger/files/daemonlogger.confd.1 | 59 | ||||
-rw-r--r-- | net-analyzer/daemonlogger/files/daemonlogger.rc.1 | 54 | ||||
-rw-r--r-- | net-analyzer/daemonlogger/metadata.xml | 19 |
9 files changed, 182 insertions, 91 deletions
diff --git a/net-analyzer/daemonlogger/ChangeLog b/net-analyzer/daemonlogger/ChangeLog index a1fc560b3..1aa09b44d 100644 --- a/net-analyzer/daemonlogger/ChangeLog +++ b/net-analyzer/daemonlogger/ChangeLog @@ -1,7 +1,13 @@ # ChangeLog for net-analyzer/daemonlogger -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 15 Feb 2011; Jason Wallace <jason.r.wallace@gmail.com> + -daemonlogger-1.0.1.ebuild, +daemonlogger-1.2.1.ebuild, + +files/daemonlogger.confd.1, +files/daemonlogger.rc.1, + -files/daemonlogger-confd, -files/daemonlogger-initd, ,metadata.xml: + Version Bump for daemonlogger. Bug 174128 + 15 Nov 2007; Jukka Ruohonen <drear@iki.fi> daemonlogger-1.0.1.ebuild: Renewed enewuser. diff --git a/net-analyzer/daemonlogger/Manifest b/net-analyzer/daemonlogger/Manifest index ae45f4f66..81781074d 100644 --- a/net-analyzer/daemonlogger/Manifest +++ b/net-analyzer/daemonlogger/Manifest @@ -1,6 +1,6 @@ -AUX daemonlogger-confd 618 RMD160 7bdfc86fe18114d32cfede194cea5fe368bc6bfa SHA1 be7453f24b046ec00b9e2fa8640dae59faeb9130 SHA256 673b2037fb0b1831a7831b1742f4252d2c435b07b62b8578cae0b45e89c7fb9a -AUX daemonlogger-initd 644 RMD160 48a574e0426fdf79be97961ce1334dfbe32831c7 SHA1 de8175e037c44a73892d36e0f89cebeda2655ad8 SHA256 9c737f1fd873208739865ec49b16ba07e752713be30a5033193e3a56282094ad -DIST daemonlogger-1.0.1.tar.gz 110360 RMD160 7bfc1dbf568357055cd581866110ce4d36e014b4 SHA1 34522b929bb3baa91c5422fa3de56b090717beb5 SHA256 f89eb22964053468c7611f3d82b3bee6c8b688b6e261fa62e49dd505d12c7f44 -EBUILD daemonlogger-1.0.1.ebuild 891 RMD160 c179f726dac726e64967ade52919fe1b194ca77f SHA1 f2b9cc5e6097749599dee9ec8dc337c7365172c9 SHA256 01101e1f096ca01af8a4b895f97c6068ab53afd35efe9261dd81bc86185f2817 -MISC ChangeLog 1193 RMD160 a856a675e369c0dc3de8360433a6509f8c4f5097 SHA1 ca23c79b4876439cb7c5482658f1fc0f75fbcefc SHA256 8d5a31b0fb5ff3c67d4c47bc5e29d0a19f95e0e366735bd6c1f1a4019952529f -MISC metadata.xml 229 RMD160 f0f6417bec31ce8baba6d476664f7210c8c84c98 SHA1 e5f94f5caadc6f843fc90bb7959570cd503676fd SHA256 3b08fca3c878bdfc4e7639f477dd542d55a4ab5dce39a475e82633071d13eb3f +AUX daemonlogger.confd.1 2002 RMD160 88a31838d61f323db3ed68423add76271f2b312b SHA1 3803a968d7b0d515895e59106f6f39070fd59c85 SHA256 9df5f55dc1410cdd90903377d28c3b402a6de5f7fe78d991b88778d40eb6b898 +AUX daemonlogger.rc.1 1414 RMD160 080f61b123ab7df2be31def6a43fe3c426ae7c7e SHA1 e1665ca6cbc15d94f98114ffee41505a71d51370 SHA256 057b7fe2f2adab67ea47e17ff81d5deea903822f72fb0af1f55693a5b045d8d8 +DIST daemonlogger-1.2.1.tar.gz 114820 RMD160 f379ad3fc35d22a8244a4fe2962edb3a3d30e05a SHA1 ce0aa20b38f18eca94a6d00fe9126d441fe2818a SHA256 79fcd34d815e9c671ffa1ea3c7d7d50f895bb7a79b4448c4fd1c37857cf44a0b +EBUILD daemonlogger-1.2.1.ebuild 1100 RMD160 e9835fefabf1c7dfb2b040bfd80c97111b7dd9f2 SHA1 865a57137f39fd529491e6e83387f1d1b4ed0b4c SHA256 40123ecb932b4aceac3bc56b805f125c10188a5e83bad32c273ffd698a0a45a3 +MISC ChangeLog 1481 RMD160 ed4966bf059dd85cb731a36327c76ae67e7ece91 SHA1 03e6281fce28916831e1aeb4db689d4a5b85a2d0 SHA256 2e59ac676069b51ea60b30b2b0bf2684a64f86aaa81a124484db94cdcb26a05d +MISC metadata.xml 750 RMD160 615ef363c2ece1357962c2f3890bb9df82e5778d SHA1 1a2bff354ffeac42648205ebbe035492f3d4bf08 SHA256 6627e2d881d3e80268b6e150bbacdd2e82d184aade5906ad3c8f74e0cff6d785 diff --git a/net-analyzer/daemonlogger/daemonlogger-1.0.1.ebuild b/net-analyzer/daemonlogger/daemonlogger-1.0.1.ebuild deleted file mode 100644 index 7521254fe..000000000 --- a/net-analyzer/daemonlogger/daemonlogger-1.0.1.ebuild +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit eutils - -DESCRIPTION="Simple packet logger & soft tap" -HOMEPAGE="http://www.snort.org/users/roesch/Site/Daemonlogger/Daemonlogger.html" -SRC_URI="http://www.snort.org/dl/${PN}/${P}.tar.gz - http://www.snort.org/users/roesch/code/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -DEPEND="dev-libs/libdnet - net-libs/libpcap" -RDEPEND="${DEPEND}" - -pkg_setup() { - enewgroup daemonlogger - enewuser daemonlogger -1 -1 -1 daemonlogger -} - -src_install() { - dosbin daemonlogger - dodoc AUTHORS ChangeLog NEWS README - - keepdir /var/log/daemonlogger - - newinitd "${FILESDIR}"/daemonlogger-initd daemonlogger - newconfd "${FILESDIR}"/daemonlogger-confd daemonlogger - - fowners daemonlogger:daemonlogger /var/log/daemonlogger - fperms 0700 /var/log/daemonlogger -} diff --git a/net-analyzer/daemonlogger/daemonlogger-1.2.1.ebuild b/net-analyzer/daemonlogger/daemonlogger-1.2.1.ebuild new file mode 100644 index 000000000..d3b3b3546 --- /dev/null +++ b/net-analyzer/daemonlogger/daemonlogger-1.2.1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils + +DESCRIPTION="Libpcap-based packet logger and soft tap" +HOMEPAGE="http://www.snort.org/users/roesch/Site/Daemonlogger/Daemonlogger.html" +SRC_URI="http://www.snort.org/users/roesch/code/${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="dev-libs/libdnet + net-libs/libpcap" +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup daemonlogger + enewuser daemonlogger -1 /dev/null -1 daemonlogger +} + +src_install () { + emake DESTDIR="${D}" install || die + dodir /etc/daemonlogger/ /var/log/daemonlogger/ || die + touch "${D}"/etc/daemonlogger/daemonlogger.bpf || die + fowners daemonlogger:daemonlogger /etc/daemonlogger/ \ + /etc/daemonlogger/daemonlogger.bpf \ + /var/log/daemonlogger/ || die + dodoc AUTHORS ChangeLog README || die + newconfd "${FILESDIR}/daemonlogger.confd.1" daemonlogger || die + newinitd "${FILESDIR}/daemonlogger.rc.1" daemonlogger || die +} + +pkg_postinst() { + elog "Configuration options can be set in /etc/conf.d/daemonlogger." +} diff --git a/net-analyzer/daemonlogger/files/daemonlogger-confd b/net-analyzer/daemonlogger/files/daemonlogger-confd deleted file mode 100644 index 39240d3a0..000000000 --- a/net-analyzer/daemonlogger/files/daemonlogger-confd +++ /dev/null @@ -1,19 +0,0 @@ -# Config file for /etc/init.d/daemonlogger. -# Note that you can run daemonlogger as a non-daemon without the init script. - -# Set the listening interface. -IFACE="eth0" - -# Set the output interface for tapping. -# Note that this disables the logging option below. -#TAP="eth1" - -# The directory to which logged pcap-files are stored. -LOGDIR="/var/log/daemonlogger" - -# The user/group to which the program drops privileges. -# Note that if you change this, please adjust the permissions of LOGDIR accordingly. -USER="daemonlogger" - -# This gathers the above options. -DAEMONLOGGER_OPTS="-d -i $IFACE -u $USER -g $USER -l $LOGDIR" diff --git a/net-analyzer/daemonlogger/files/daemonlogger-initd b/net-analyzer/daemonlogger/files/daemonlogger-initd deleted file mode 100644 index f9b172169..000000000 --- a/net-analyzer/daemonlogger/files/daemonlogger-initd +++ /dev/null @@ -1,26 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -if [ -n "${TAP}" ] ; then - DAEMONLOGGER_OPTS="${DAEMONLOGGER_OPTS} -o ${TAP}" -fi - -depend() { - need net -} - -start() { - ebegin "Starting daemonlogger on ${IFACE}" - start-stop-daemon --start --exec /usr/sbin/daemonlogger \ - --pidfile /var/run/daemonlogger_$IFACE.pid --background \ - -- -P /var/run -p daemonlogger_$IFACE.pid ${DAEMONLOGGER_OPTS} - eend $? -} - -stop() { - ebegin "Stopping daemonlogger on ${IFACE}" - start-stop-daemon --stop --quiet --retry 5 --pidfile /var/run/daemonlogger_$IFACE.pid - eend $? -} diff --git a/net-analyzer/daemonlogger/files/daemonlogger.confd.1 b/net-analyzer/daemonlogger/files/daemonlogger.confd.1 new file mode 100644 index 000000000..63e168225 --- /dev/null +++ b/net-analyzer/daemonlogger/files/daemonlogger.confd.1 @@ -0,0 +1,59 @@ +# Config file for /etc/init.d/daemonlogger + +#### Service related options #### +# This tell daemonlogger which interface to listen on +IFACE="eth0" +# +# User and Group to run as +DL_USER="daemonlogger" +DL_GROUP="daemonlogger" +# +# Define the location of your BPF file. +BPF="/etc/daemonlogger/daemonlogger.bpf" +# +# Set the number of bytes to capture per packet. +# Specify 0 (zero) to capture the full packet. +# 'man tcpdump' for more info about snaplen. +SNAP="0" +# +# This option determins if daemonlogger will log captured packets +# to disk (log mode) or redirect them out a second interface (tap mode). +# Valid options are "log" or "tap" +DL_MODE="log" +########################### + +##### Log Mode Options ##### +# If you specified "log" above, then these options will be used +# when you start the daemonlogger init script. +# +# Directory to log pcap files to. +LOG_DIR="/var/log/daemonlogger" +# +# The pcap files can be rolled over based on size, time or both. +# If you want to use only size or time, then comment out the one you do not +# wish to use. If you use both, then the first boundry the file reaches +# will cause the pcap file to roll over. +# +# Rollover the log file if it reaches this size in bytes. +#LOG_SIZE="1073741824" +# +# Rollover the log file on time intervals. Append an 'm' to rollover on minute +# boundaries, 'h' to rollover on hour boundaries and 'd' to rollover on day boundaries. +# See the README in the doc directory for more information. +LOG_TIME="1h" +# +# This option will write log files to the disk until it reaches this % utilization and +# then roll over and delete the oldest log file. +LOG_PCT="80" +############################ + +##### Tap Mode Options ##### +# If you specified "tap" above, then these options will be used +# when you start the daemonlogger init script. +# +# In tap mode, which interface to output packets to. This can not +# be the same as IFACE above. +TAP_OFACE="eth1" +############################ + +DL_OPTS="-d -i $IFACE -S $SNAP -f $BPF -u $DL_USER -g $DL_GROUP" diff --git a/net-analyzer/daemonlogger/files/daemonlogger.rc.1 b/net-analyzer/daemonlogger/files/daemonlogger.rc.1 new file mode 100644 index 000000000..338323f6e --- /dev/null +++ b/net-analyzer/daemonlogger/files/daemonlogger.rc.1 @@ -0,0 +1,54 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + after net.${IFACE} + + if [[ ${DL_MODE} = "tap" ]] ; then + after net.${TAP_OFACE} + fi +} + +start() { + + if [ ! -d /var/run/daemonlogger ]; then + mkdir -p /var/run/daemonlogger + chown ${DL_USER}:${DL_GROUP} /var/run/daemonlogger + fi + + if [[ ${DL_MODE} = "log" ]]; then + LOG_OPTS="-l ${LOG_DIR} -M ${LOG_PCT} -r" + + if [[ -n $LOG_SIZE ]]; then + LOG_OPTS="${LOG_OPTS} -s ${LOG_SIZE}" + fi + + if [[ -n $LOG_TIME ]]; then + LOG_OPTS="${LOG_OPTS} -t ${LOG_TIME}" + fi + + ebegin "Starting daemonlogger in LOG mode" + start-stop-daemon --start --quiet --exec /usr/bin/daemonlogger \ + --pidfile /var/run/daemonlogger/daemonlogger.pid \ + -- ${LOG_OPTS} ${DL_OPTS} -P /var/run/daemonlogger -p daemonlogger.pid >/dev/null 2>&1 + eend $? + + elif [[ ${DL_MODE} = "tap" ]]; then + ebegin "Starting daemonlogger in TAP mode" + start-stop-daemon --start --quiet --exec /usr/bin/daemonlogger \ + --pidfile /var/run/daemonlogger/daemonlogger.pid \ + -- -o ${TAP_OFACE} ${DL_OPTS} -P /var/run/daemonlogger -p daemonlogger.pid >/dev/null 2>&1 + eend $? + else + eerror 'DL_MODE not set to "log" or "tap" in /etc/conf.d/daemonlogger!' + fi +} + +stop() { + ebegin "Stopping daemonlogger" + start-stop-daemon --stop --quiet --pidfile /var/run/daemonlogger/daemonlogger.pid + eend $? +} + diff --git a/net-analyzer/daemonlogger/metadata.xml b/net-analyzer/daemonlogger/metadata.xml index e6233b5dc..79ab1bfaa 100644 --- a/net-analyzer/daemonlogger/metadata.xml +++ b/net-analyzer/daemonlogger/metadata.xml @@ -1,6 +1,21 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<herd>no-herd</herd> -<maintainer><email>maintainer-wanted@gentoo.org</email></maintainer> + <herd>no-herd</herd> + <longdescription lang="en"> + This is a libpcap-based program with two runtime modes: + 1)It can sniff packets and spools them straight to disk + and can daemonize itself for background packet logging. + 2)It can sniff packets and rewrite them to a second + interface, acting as a soft tap. + These two runtime modes are mutually exclusive. + </longdescription> + <maintainer><email>maintainer-wanted@gentoo.org</email></maintainer> + <upstream> + <maintainer> + <email>roesch@sourcefire.com</email> + <name>Martin Roesch</name> + </maintainer> + </upstream> </pkgmetadata> + |