summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-forensics/rkhunter
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
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 <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-forensics/rkhunter')
-rw-r--r--app-forensics/rkhunter/Manifest2
-rw-r--r--app-forensics/rkhunter/files/rkhunter-1.3.cron134
-rw-r--r--app-forensics/rkhunter/files/rkhunter-1.4.0.conf.patch31
-rw-r--r--app-forensics/rkhunter/files/rkhunter-1.4.2.conf.patch38
-rw-r--r--app-forensics/rkhunter/files/rkhunter.bash-completion88
-rw-r--r--app-forensics/rkhunter/metadata.xml8
-rw-r--r--app-forensics/rkhunter/rkhunter-1.4.0.ebuild68
-rw-r--r--app-forensics/rkhunter/rkhunter-1.4.2.ebuild65
8 files changed, 434 insertions, 0 deletions
diff --git a/app-forensics/rkhunter/Manifest b/app-forensics/rkhunter/Manifest
new file mode 100644
index 000000000000..614e87813ee2
--- /dev/null
+++ b/app-forensics/rkhunter/Manifest
@@ -0,0 +1,2 @@
+DIST rkhunter-1.4.0.tar.gz 244211 SHA256 8a03d6add50663531994d55aff058eced74c64df948b88176621cd761b68ccf9 SHA512 597e8b2e3f75cd1cb57dd3e33df004265f03ca1503310f984211612da43a160e5d3b50626b4918bd38bf0d239fe2e4a45e55a96212c5a3b5a5645e77e030b60a WHIRLPOOL 45c023b625c7c1664a9f99438b5bebe5ed70265346f122b9d71f91611439d77a2bda01c137698898314183458c4467c66f73bb703b83fbaae2ffe65ded3307ad
+DIST rkhunter-1.4.2.tar.gz 277707 SHA256 789cc84a21faf669da81e648eead2e62654cfbe0b2d927119d8b1e55b22b65c3 SHA512 a4e45caaaf5b8262619ebb890784c75c4e30db4c6c0eba305f86d419142b4796c95bc55fe8846dce8d58bc7636bdb365a4a8c41707f64d4d81373687c5a3b0d4 WHIRLPOOL 911ed8e37e112516adba3afb63e3d4862d061ea35cd4b8becea455922d6b2a744f4b8e7cf92685cff29c3192c594dfc58ba3c194f371dd4d95530bd4c09c5d84
diff --git a/app-forensics/rkhunter/files/rkhunter-1.3.cron b/app-forensics/rkhunter/files/rkhunter-1.3.cron
new file mode 100644
index 000000000000..ae14dd3dcb67
--- /dev/null
+++ b/app-forensics/rkhunter/files/rkhunter-1.3.cron
@@ -0,0 +1,134 @@
+#!/bin/bash
+# $Id$
+# original author: Aaron Walker <ka0ttic@gentoo.org>
+
+########################## Begin Configuration ###############################
+
+# Default options - more options may be added depending on the
+# configuration variables you set below
+# --cronjob implies -c, --nocolor, --sk
+RKHUNTER_OPTS="--cronjob --summary"
+
+# Set this to 'yes' to enable ; this script does nothing otherwise
+ENABLE=no
+
+# Automatically update rkhunter's dat files prior to running?
+UPDATE=no
+
+# Set this to 'yes' if you wish the output to be mailed to you
+SEND_EMAIL=no
+
+# NOTE: the following EMAIL_* variables are only relevant if you set the
+# SEND_EMAIL variable to 'yes'
+EMAIL_SUBJECT="${HOSTNAME}: rkhunter output"
+EMAIL_RECIPIENT=root
+EMAIL_CMD="|mail -s \"${EMAIL_SUBJECT}\" ${EMAIL_RECIPIENT}"
+
+# Log rkhunter output?
+LOG=no
+
+# The default log location is /var/log/rkhunter.log. Set this variable if
+# you'd like to use an alternate location.
+#LOGFILE=""
+
+# By default, the log file created by rkhunter is world-readable (0644). If
+# you'd like to modify the permissions afterwards, set this variable. The
+# value of this variable, must be a valid chmod argument such as '0600' or
+# 'u+rw,go-rwx'. See the chmod(1) manual page for more information.
+#LOGFILE_PERMS="0600"
+
+# By default, rkhunter overwrites the previous log. Set this variable
+# to 'yes' if you'd like the log output appended to the logfile, instead
+# of overwriting it.
+SAVE_OLD_LOGS=no
+
+# Set to 1 to recieve only warnings & errors
+# Set to 2 to recieve ALL rkhunter output
+# Set to 3 to recieve rkhunter report
+VERBOSITY=3
+
+########################### End Configuration ################################
+
+# exit immediately, unless enabled
+[[ "${ENABLE}" == "yes" ]] || exit 0
+
+# debug mode? (mainly for my benefit)
+if [[ -n "${1}" ]] && [[ ${1} = "-d" ]] ; then
+ set -o verbose -o xtrace
+fi
+
+[[ -z "${LOGFILE}" ]] && LOGFILE="/var/log/rkhunter.log"
+
+# moved this out of config section since it'll
+# probably never need to be changed
+RKHUNTER_EXEC="/usr/sbin/rkhunter"
+
+# sanity check
+if [[ ! -x "${RKHUNTER_EXEC}" ]] ; then
+ echo "${RKHUNTER_EXEC} does not exist or is not executable!"
+ exit 1
+fi
+
+# we create a few tmp files, so let's at least make
+# them readable/writable by root only
+umask 0077
+
+# all output goes to this temp file
+_tmpout=$(mktemp /tmp/rkhunter.cron.XXXXXX)
+exec > ${_tmpout} 2>&1
+
+# update data files
+if [[ "${UPDATE}" == "yes" ]] ; then
+ # save the output of --update in a tmp file so that it can be mailed
+ # along with the scan output; otherwise the user will get 2 mails
+ ${RKHUNTER_EXEC} --nocolor --update
+fi
+
+# formulate options string according to user configuration
+[[ "${LOG}" == "yes" ]] && \
+ RKHUNTER_OPTS="${RKHUNTER_OPTS} --createlogfile ${LOGFILE}"
+
+case "${VERBOSITY}" in
+ # warnings and errors only
+ 1) RKHUNTER_OPTS="${RKHUNTER_OPTS} --quiet" ;;
+ # default rkhunter output (no extra options)
+# 2) ;;
+ # default to option 3
+ *) ;;
+esac
+
+# save old log
+if [[ "${LOG}" == "yes" && "${SAVE_OLD_LOGS}" == "yes" ]] ; then
+ if [[ -e "${LOGFILE}" ]] ; then
+ _tmpfile=$(mktemp ${LOGFILE}.XXXXXX)
+ mv -f ${LOGFILE} ${_tmpfile}
+ echo -e "--\nrkhunter.cron commencing at: $(date)\n--" >> ${_tmpfile}
+ fi
+fi
+
+# finally, run rkhunter
+CMD="${RKHUNTER_EXEC} ${RKHUNTER_OPTS}"
+eval ${CMD}
+RV=$?
+
+# email output?
+if [[ "${SEND_EMAIL}" == "yes" ]] ; then
+ CMD="cat ${_tmpout} ${EMAIL_CMD}"
+ eval ${CMD}
+fi
+
+# remove temp file
+[[ -n "${_tmpout}" ]] && rm -f ${_tmpout}
+
+[[ "${LOG}" != "yes" ]] && exit ${RV}
+
+# from this point on, we can assume logging is enabled
+
+# append new log to old log and restore
+if [[ -n "${_tmpfile}" ]] ; then
+ cat ${LOGFILE} >> ${_tmpfile}
+ mv ${_tmpfile} ${LOGFILE}
+fi
+
+chmod ${LOGFILE_PERMS:-0644} ${LOGFILE}
+exit ${RV}
diff --git a/app-forensics/rkhunter/files/rkhunter-1.4.0.conf.patch b/app-forensics/rkhunter/files/rkhunter-1.4.0.conf.patch
new file mode 100644
index 000000000000..0b5465590c2a
--- /dev/null
+++ b/app-forensics/rkhunter/files/rkhunter-1.4.0.conf.patch
@@ -0,0 +1,31 @@
+--- rkhunter.conf.old 2009-01-07 17:33:11.000000000 +0100
++++ rkhunter.conf 2009-01-07 17:36:58.000000000 +0100
+@@ -19,6 +19,7 @@
+ # describing the option will say if this is so.
+ #
+
++INSTALLDIR=/usr
+
+ #
+ # If this option is set to 1, it specifies that the mirrors file
+@@ -84,17 +85,17 @@ MAIL_CMD=mail -s "[rkhunter] Warnings fo
+ # important files will be written to this directory, so be
+ # sure that the directory permissions are tight.
+ #
+-#TMPDIR=/var/lib/rkhunter/tmp
++TMPDIR=/var/lib/rkhunter/tmp
+
+ #
+ # Specify the database directory to use.
+ #
+-#DBDIR=/var/lib/rkhunter/db
++DBDIR=/var/lib/rkhunter/db
+
+ #
+ # Specify the script directory to use.
+ #
+-#SCRIPTDIR=/usr/local/lib/rkhunter/scripts
++SCRIPTDIR=/usr/lib/rkhunter/scripts
+
+ #
+ # Specify the root directory to use.
diff --git a/app-forensics/rkhunter/files/rkhunter-1.4.2.conf.patch b/app-forensics/rkhunter/files/rkhunter-1.4.2.conf.patch
new file mode 100644
index 000000000000..8fd49ab421da
--- /dev/null
+++ b/app-forensics/rkhunter/files/rkhunter-1.4.2.conf.patch
@@ -0,0 +1,38 @@
+diff -Naur rkhunter-1.4.2/files/rkhunter.conf rkhunter-1.4.2-fixed/files/rkhunter.conf
+--- rkhunter-1.4.2/files/rkhunter.conf 2014-01-25 16:29:51.000000000 -0500
++++ rkhunter-1.4.2-fixed/files/rkhunter.conf 2014-05-27 11:58:11.098750088 -0400
+@@ -72,6 +72,7 @@
+ # to use.
+ #
+
++INSTALLDIR=/usr
+
+ #
+ # If this option is set to '1', it specifies that the mirrors file
+@@ -154,7 +155,7 @@
+ # subsequently commented out or removed, then the program will assume a
+ # default directory beneath the installation directory.
+ #
+-#TMPDIR=/var/lib/rkhunter/tmp
++TMPDIR=/var/lib/rkhunter/tmp
+
+ #
+ # This option specifies the database directory to use.
+@@ -163,7 +164,7 @@
+ # subsequently commented out or removed, then the program will assume a
+ # default directory beneath the installation directory.
+ #
+-#DBDIR=/var/lib/rkhunter/db
++DBDIR=/var/lib/rkhunter/db
+
+ #
+ # This option specifies the script directory to use.
+@@ -171,7 +172,7 @@
+ # The installer program will set the default directory. If this default is
+ # subsequently commented out or removed, then the program will not run.
+ #
+-#SCRIPTDIR=/usr/local/lib/rkhunter/scripts
++SCRIPTDIR=/usr/lib/rkhunter/scripts
+
+ #
+ # This option can be used to modify the command directory list used by rkhunter
diff --git a/app-forensics/rkhunter/files/rkhunter.bash-completion b/app-forensics/rkhunter/files/rkhunter.bash-completion
new file mode 100644
index 000000000000..5235e74d7735
--- /dev/null
+++ b/app-forensics/rkhunter/files/rkhunter.bash-completion
@@ -0,0 +1,88 @@
+# $Id$
+# rkhunter completion
+
+_rkhunter() {
+ local cur prev opts
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ opts="-c --checkall --createlogfile --cronjob --display-logfile -h --help\
+ --nocolors --report-mode --report-warnings-only \
+ --skip-application-check --skip-keypress --quick --quiet --update \
+ --version --versioncheck --bindir --configfile --dbdir --rootdir \
+ --tmpdir --disable-md5-check --disable-passwd-check \
+ --scan-knownbad-files"
+
+ if [[ "${cur}" == -* ]] || [[ ${COMP_CWORD} -eq 1 ]]; then
+ COMPREPLY=($(compgen -W "${opts}" -- "${cur}"))
+ fi
+
+ case "${prev}" in
+ --createlogfile)
+ COMPREPLY=($(compgen -o filenames -A file -W "${opts/--createlogfile}" \
+ -- "${cur}"))
+ ;;
+ --display-logfile)
+ COMPREPLY=($(compgen -W "${opts/--display-logfile}" -- "${cur}"))
+ ;;
+ --*dir)
+ COMPREPLY=($(compgen -o dirnames -A directory -- "${cur}"))
+ ;;
+ --*file)
+ COMPREPLY=($(compgen -o filenames -A file -- "${cur}"))
+ ;;
+ -c|--checkall)
+ COMPREPLY=($(compgen -W "${opts/-c --checkall}" -- "${cur}"))
+ ;;
+ --cronjob)
+ COMPREPLY=($(compgen -W "${opts/--cronjob}" -- "${cur}"))
+ ;;
+ -h|--help)
+ COMPREPLY=($(compgen -W "${opts/-h --help}" -- "${cur}"))
+ ;;
+ --nocolors)
+ COMPREPLY=($(compgen -W "${opts/--nocolors}" -- "${cur}"))
+ ;;
+ --report-mode)
+ COMPREPLY=($(compgen -W "${opts/--report-mode}" -- "${cur}"))
+ ;;
+ --report-warnings-only)
+ COMPREPLY=($(compgen -W "${opts/--report-warnings-only}" -- \
+ "${cur}"))
+ ;;
+ --skip-application-check)
+ COMPREPLY=($(compgen -W "${opts/--skip-application-check}" -- \
+ "${cur}"))
+ ;;
+ --skip-keypress)
+ COMPREPLY=($(compgen -W "${opts/--skip-keypress}" -- "${cur}"))
+ ;;
+ --quick)
+ COMPREPLY=($(compgen -W "${opts/--quick}" -- "${cur}"))
+ ;;
+ --quiet)
+ COMPREPLY=($(compgen -W "${opts/--quiet}" -- "${cur}"))
+ ;;
+ --update)
+ COMPREPLY=($(compgen -W "${opts/--update}" -- "${cur}"))
+ ;;
+ --version)
+ COMPREPLY=($(compgen -W "${opts/--version}" -- "${cur}"))
+ ;;
+ --versioncheck)
+ COMPREPLY=($(compgen -W "${opts/--versioncheck}" -- "${cur}"))
+ ;;
+ --disable-md5-check)
+ COMPREPLY=($(compgen -W "${opts/--disable-md5-check}" -- "${cur}"))
+ ;;
+ --disable-passwd-check)
+ COMPREPLY=($(compgen -W "${opts/--disable-passwd-check}" -- \
+ "${cur}"))
+ ;;
+ --scan-knownbad-files)
+ COMPREPLY=($(compgen -W "${opts/--scan-knownbad-files}" -- \
+ "${cur}"))
+ ;;
+ esac
+}
+complete -F _rkhunter rkhunter
diff --git a/app-forensics/rkhunter/metadata.xml b/app-forensics/rkhunter/metadata.xml
new file mode 100644
index 000000000000..c1740f780c19
--- /dev/null
+++ b/app-forensics/rkhunter/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>forensics</herd>
+ <upstream>
+ <remote-id type="sourceforge">rkhunter</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-forensics/rkhunter/rkhunter-1.4.0.ebuild b/app-forensics/rkhunter/rkhunter-1.4.0.ebuild
new file mode 100644
index 000000000000..d8a37b339a1b
--- /dev/null
+++ b/app-forensics/rkhunter/rkhunter-1.4.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils bash-completion-r1
+
+DESCRIPTION="Rootkit Hunter scans for known and unknown rootkits, backdoors, and sniffers"
+HOMEPAGE="http://rkhunter.sf.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~mips ppc x86"
+IUSE=""
+
+RDEPEND="
+ app-shells/bash
+ dev-lang/perl
+ sys-process/lsof[rpc]
+ virtual/cron
+ virtual/mailx
+"
+
+S="${WORKDIR}/${P}/files"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}.conf.patch"
+}
+
+src_install() {
+ # rkhunter requires to be root
+ dosbin ${PN}
+
+ # rkhunter doesn't create it by itself
+ dodir /var/lib/${PN}/tmp
+
+ insinto /etc
+ doins ${PN}.conf
+
+ exeinto /usr/lib/${PN}/scripts
+ doexe *.pl
+
+ insinto /var/lib/${PN}/db
+ doins *.dat
+
+ insinto /var/lib/${PN}/db/i18n
+ doins i18n/*
+
+ doman ${PN}.8
+ dodoc ACKNOWLEDGMENTS CHANGELOG FAQ README
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}/${PN}-1.3.cron" ${PN}
+
+ newbashcomp "${FILESDIR}/${PN}.bash-completion" ${PN}
+}
+
+pkg_postinst() {
+ elog "A cron script has been installed to /etc/cron.daily/rkhunter."
+ elog "To enable it, edit /etc/cron.daily/rkhunter and follow the"
+ elog "directions."
+ elog "If you want ${PN} to send mail, you will need to install"
+ elog "virtual/mailx or alter the EMAIL_CMD variable in the"
+ elog "cron script and possibly the MAIL_CMD variable in the"
+ elog "${PN}.conf file to use another mail client."
+}
diff --git a/app-forensics/rkhunter/rkhunter-1.4.2.ebuild b/app-forensics/rkhunter/rkhunter-1.4.2.ebuild
new file mode 100644
index 000000000000..715b9e2e540d
--- /dev/null
+++ b/app-forensics/rkhunter/rkhunter-1.4.2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils bash-completion-r1
+
+DESCRIPTION="Rootkit Hunter scans for known and unknown rootkits, backdoors, and sniffers"
+HOMEPAGE="http://rkhunter.sf.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~mips ppc x86"
+IUSE=""
+
+RDEPEND="
+ app-shells/bash
+ dev-lang/perl
+ sys-process/lsof[rpc]
+ virtual/cron
+ virtual/mailx
+"
+
+S="${WORKDIR}/${P}/files"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}.conf.patch"
+}
+
+src_install() {
+ # rkhunter requires to be root
+ dosbin ${PN}
+
+ insinto /etc
+ doins ${PN}.conf
+
+ exeinto /usr/lib/${PN}/scripts
+ doexe *.pl
+
+ insinto /var/lib/${PN}/db
+ doins *.dat
+
+ insinto /var/lib/${PN}/db/i18n
+ doins i18n/*
+
+ doman ${PN}.8
+ dodoc ACKNOWLEDGMENTS CHANGELOG FAQ README
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}/${PN}-1.3.cron" ${PN}
+
+ newbashcomp "${FILESDIR}/${PN}.bash-completion" ${PN}
+}
+
+pkg_postinst() {
+ elog "A cron script has been installed to /etc/cron.daily/rkhunter."
+ elog "To enable it, edit /etc/cron.daily/rkhunter and follow the"
+ elog "directions."
+ elog "If you want ${PN} to send mail, you will need to install"
+ elog "virtual/mailx or alter the EMAIL_CMD variable in the"
+ elog "cron script and possibly the MAIL_CMD variable in the"
+ elog "${PN}.conf file to use another mail client."
+}