diff options
author | Patrick Lauer <patrick@gentoo.org> | 2009-01-18 00:20:29 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2009-01-18 00:20:29 +0000 |
commit | 4a2fccf336872ecf58c2083e52670e685c9afc17 (patch) | |
tree | ebdd78dd35c4a39e3e362524bbbb01311135b797 /app-forensics | |
parent | it's GPL-3 now (diff) | |
download | historical-4a2fccf336872ecf58c2083e52670e685c9afc17.tar.gz historical-4a2fccf336872ecf58c2083e52670e685c9afc17.tar.bz2 historical-4a2fccf336872ecf58c2083e52670e685c9afc17.zip |
Fixed cron handling
Package-Manager: portage-2.2_rc22/cvs/Linux 2.6.28 x86_64
Diffstat (limited to 'app-forensics')
-rw-r--r-- | app-forensics/rkhunter/ChangeLog | 9 | ||||
-rw-r--r-- | app-forensics/rkhunter/Manifest | 7 | ||||
-rw-r--r-- | app-forensics/rkhunter/files/rkhunter-1.3.cron | 134 | ||||
-rw-r--r-- | app-forensics/rkhunter/files/rkhunter.cron | 10 | ||||
-rw-r--r-- | app-forensics/rkhunter/files/rkhunter.cron.patch | 40 | ||||
-rw-r--r-- | app-forensics/rkhunter/rkhunter-1.3.4-r2.ebuild | 67 |
6 files changed, 218 insertions, 49 deletions
diff --git a/app-forensics/rkhunter/ChangeLog b/app-forensics/rkhunter/ChangeLog index 8e1a4b7d2024..c382e417375e 100644 --- a/app-forensics/rkhunter/ChangeLog +++ b/app-forensics/rkhunter/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-forensics/rkhunter # Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-forensics/rkhunter/ChangeLog,v 1.66 2009/01/17 20:56:51 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-forensics/rkhunter/ChangeLog,v 1.67 2009/01/18 00:20:29 patrick Exp $ + +*rkhunter-1.3.4-r2 (18 Jan 2009) + + 18 Jan 2009; Patrick Lauer <patrick@gentoo.org> +files/rkhunter-1.3.cron, + files/rkhunter.cron, -files/rkhunter.cron.patch, + +rkhunter-1.3.4-r2.ebuild: + Fixed cron handling. 17 Jan 2009; Patrick Lauer <patrick@gentoo.org> -rkhunter-1.3.4.ebuild: Punting broken ebuild diff --git a/app-forensics/rkhunter/Manifest b/app-forensics/rkhunter/Manifest index 71c6c3ebe45d..bb5edff31f01 100644 --- a/app-forensics/rkhunter/Manifest +++ b/app-forensics/rkhunter/Manifest @@ -1,11 +1,11 @@ AUX rkhunter-1.2.1-create-tmpdir.diff 551 RMD160 dbcb928cba8fc847c118970ef613ebc49e4bd972 SHA1 a6a2430ed295ced12efd79224066fe8f314d89ec SHA256 900acac0077f0aaf61773c49c256ba0cc506e51e9a1c0dfdd9be00b35fa8a882 AUX rkhunter-1.2.3-specify-logfile.patch 2481 RMD160 0a3450cd8f7799c63c4d78d8189d93ddf2eda02a SHA1 84db30b4f7319acd3bd4d1d7bdc63adff2349e7a SHA256 111be216f8b15876ef134e66905f665af722967f218bc401ac595cf89b4f2468 AUX rkhunter-1.2.9-ppc64.patch 1462 RMD160 93abd74545ef5320716d882f4818ab2b05a2b642 SHA1 7a1a4698e78a543ae345f715e2bea704e60a5b9b SHA256 7106dfea15f063448476f657df4a9a17789ab77ab7d0e5526d3a659b8355f88b +AUX rkhunter-1.3.cron 4039 RMD160 f97b1b1f8554fe702439fc3f6088a3ed1cec69d0 SHA1 82b04d2ef92eb59da544427401eb81b656da1cd8 SHA256 6fc3a7dc3ad9a406916537fc06e849ef960dd1298e45f29af4d59bb242f064a5 AUX rkhunter-ppc64.patch 353 RMD160 338c519108f8be28605ce4a1109bfd762fa4c90f SHA1 9219cba514785638e5977dd284dbdfb0f60ee813 SHA256 dfbb2fb8e54e405d935c9c0fefd5ee494b675c496eea97c3d08491641da68163 AUX rkhunter.bash-completion 2628 RMD160 f408877f6b8d38bfb17af6074e5a1fbecc134cd6 SHA1 a0a007ecda0de61d5e8044672048c6f406183cfb SHA256 d99776d6b300697cb6571e409e6c93bc96e68980922ee22b76eda56f26d0d970 AUX rkhunter.conf.patch 786 RMD160 6d645ca67b77e3c6abacbc2c0de259e5e6204852 SHA1 9dbb80960b2273a7fb8d4fcd1b4ccb758b91c5cc SHA256 2ca73ff5b9e7b6b3b1c65948813f5124662b8fb6087108adebccd9aa5e4a19d8 -AUX rkhunter.cron 3881 RMD160 6e4948187457f8000817583226ac9184a5911e1d SHA1 e73f69590ceddfbdbb0def6af32949fec7f33a70 SHA256 9482f706b930e11f27b11444005ff48efe830417f86303e9d1f68feb8cae2d49 -AUX rkhunter.cron.patch 1419 RMD160 3722f0e33ef09a8ef4cc4fd7c8190ee906530d6f SHA1 c7e32a7d4f42fe69a9bb94c21a0a98e68552b78d SHA256 2768049e1c49216eaa4473b3fc9fe179d188109eabf3f1e6c326bde5ce20c415 +AUX rkhunter.cron 3822 RMD160 3e310cbb21ca9cfb4a0d12c4abe69d977b14df28 SHA1 b91a62118192d582ed4b1576b026385dbea5aca0 SHA256 acf03c41bac94a8fb86f8f57b19f50770c99db651444e518a1b452e20157f4a3 DIST rkhunter-1.2.7.tar.gz 170732 RMD160 12262942d90bd4f42e7bd4ba19d9426a736c0d84 SHA1 1ef3eef721c6ab38c118d7ed92e587fc234b91b4 SHA256 469e0087f9ab460d901241b6d80b1ad341ba5827e643127c68c4b865bc9e1972 DIST rkhunter-1.2.8.tar.gz 126314 RMD160 c0cc2fbe8d58bbf7a5f495d7c4fdcf993271796b SHA1 1a882ef4351214facffcad1d5c0e7acf1a9d875b SHA256 7a8c364fe1653c8f9d64054d07d2272ea239a5225ce2044024d79467df873c18 DIST rkhunter-1.2.9.tar.gz 147123 RMD160 ffa89d3c953bd0f1d8266067ae1e99b829bdc504 SHA1 42d2125f5c145ee77c162d6d5cca50e06af7a3a0 SHA256 64d21cef13574338f49015127d369e1f02515fe4eb81cbda716d885ff4cd1278 @@ -14,5 +14,6 @@ EBUILD rkhunter-1.2.7-r1.ebuild 1762 RMD160 0257fd6f4868e163527b886f5f13b953b10d EBUILD rkhunter-1.2.8.ebuild 1765 RMD160 bf7a52d55663835646a869577238aff88ed7d332 SHA1 7608646479130fe51d6f6d34bac45567e3f2a214 SHA256 f549cf8097baa39b93625c4b1e6ceb8cb22dc1af33c10788a7f399525601c8d6 EBUILD rkhunter-1.2.9.ebuild 1760 RMD160 aea4b84154e0ffae6fa443a2347604eb4d0abb59 SHA1 d124ff1901121094d878deb8c0f26ca034b2e09b SHA256 ae5bb0c997810824fea9ef013628a982d4b02ca8b0023ca41a13717663c1ec05 EBUILD rkhunter-1.3.4-r1.ebuild 1636 RMD160 850743ea58f57a47f6493daca2afc252244b7c58 SHA1 313fb8d1e0cb3a13f2c85b4cbb247b9cd9a67adf SHA256 b00a2720558d32b2ad2561d508d194fa59af371332620e215cb3d4364ef6b840 -MISC ChangeLog 11920 RMD160 dc68c28bce52301282b9d600a62929ef4ca26769 SHA1 b4096474887345889310ae44a3d2fab925d0b54a SHA256 dded7dcde8598e09c25148b485fcf24dc5895d6b20bb3fe992ffe0048472e0e2 +EBUILD rkhunter-1.3.4-r2.ebuild 1640 RMD160 af7470d7aad123f5bcb73ab21586589c0fb1c912 SHA1 bc222685e16df93f0c029c7ace482da99e02156d SHA256 55d34c042dd3849312dccd81384f4eee6ea8717ab21bcd3be68ec069b13877e9 +MISC ChangeLog 12134 RMD160 2eeb9d331670952a19fefe4474aa26f0ad0067cd SHA1 c1ae9659f62d518b94805c6af29669d016cda447 SHA256 b4b54b42c24c85b42d0e592d4d480ae26820c72c422a2ee3327ea0a5b994ff2e MISC metadata.xml 164 RMD160 7cd3bffc39aa87dceaef97342b19343323175238 SHA1 97b9dc021ecbad46bf0f3a99aeb204f45792faeb SHA256 e8d7dfabbaf13302703ccc3428fa0ecedf5d444e0c58692ebbd03c5bd0d9240f 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..fc92f4d20e39 --- /dev/null +++ b/app-forensics/rkhunter/files/rkhunter-1.3.cron @@ -0,0 +1,134 @@ +#!/bin/bash +# $Header: /var/cvsroot/gentoo-x86/app-forensics/rkhunter/files/rkhunter-1.3.cron,v 1.1 2009/01/18 00:20:29 patrick Exp $ +# 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} --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.cron b/app-forensics/rkhunter/files/rkhunter.cron index d5a763d37fe6..ccb3acd06bfb 100644 --- a/app-forensics/rkhunter/files/rkhunter.cron +++ b/app-forensics/rkhunter/files/rkhunter.cron @@ -1,5 +1,5 @@ #!/bin/bash -# $Header: /var/cvsroot/gentoo-x86/app-forensics/rkhunter/files/rkhunter.cron,v 1.3 2005/09/02 09:58:35 ka0ttic Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-forensics/rkhunter/files/rkhunter.cron,v 1.4 2009/01/18 00:20:29 patrick Exp $ # original author: Aaron Walker <ka0ttic@gentoo.org> ########################## Begin Configuration ############################### @@ -60,7 +60,7 @@ fi # moved this out of config section since it'll # probably never need to be changed -RKHUNTER_EXEC="/usr/bin/rkhunter" +RKHUNTER_EXEC="/usr/sbin/rkhunter" # sanity check if [[ ! -x "${RKHUNTER_EXEC}" ]] ; then @@ -91,9 +91,9 @@ case "${VERBOSITY}" in # warnings and errors only 1) RKHUNTER_OPTS="${RKHUNTER_OPTS} --quiet" ;; # default rkhunter output (no extra options) - 2) ;; - # default to option 3 (report-mode) - *) RKHUNTER_OPTS="${RKHUNTER_OPTS} --report-mode" ;; +# 2) ;; + # default to option 3 + *) ;; esac # save old log diff --git a/app-forensics/rkhunter/files/rkhunter.cron.patch b/app-forensics/rkhunter/files/rkhunter.cron.patch deleted file mode 100644 index 87dced7509a1..000000000000 --- a/app-forensics/rkhunter/files/rkhunter.cron.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- files/rkhunter.cron 2005-09-02 12:05:27.000000000 +0200 -+++ files/rkhunter.cron 2009-01-12 17:57:10.000000000 +0100 -@@ -1,12 +1,13 @@ - #!/bin/bash --# $Header: /var/cvsroot/gentoo-x86/app-forensics/rkhunter/files/rkhunter.cron.patch,v 1.1 2009/01/17 20:55:15 patrick Exp $ -+# $Header: /var/cvsroot/gentoo-x86/app-forensics/rkhunter/files/rkhunter.cron.patch,v 1.1 2009/01/17 20:55:15 patrick Exp $ - # original author: Aaron Walker <ka0ttic@gentoo.org> - - ########################## Begin Configuration ############################### - - # Default options - more options may be added depending on the - # configuration variables you set below --RKHUNTER_OPTS="-c --cronjob --skip-keypress" -+# --cronjob implies -c, --nocolor, --sk -+RKHUNTER_OPTS="--cronjob --summary" - - # Set this to 'yes' to enable ; this script does nothing otherwise - ENABLE=no -@@ -60,7 +61,7 @@ fi - - # moved this out of config section since it'll - # probably never need to be changed --RKHUNTER_EXEC="/usr/bin/rkhunter" -+RKHUNTER_EXEC="/usr/sbin/rkhunter" - - # sanity check - if [[ ! -x "${RKHUNTER_EXEC}" ]] ; then -@@ -91,9 +92,9 @@ case "${VERBOSITY}" in - # warnings and errors only - 1) RKHUNTER_OPTS="${RKHUNTER_OPTS} --quiet" ;; - # default rkhunter output (no extra options) -- 2) ;; -- # default to option 3 (report-mode) -- *) RKHUNTER_OPTS="${RKHUNTER_OPTS} --report-mode" ;; -+# 2) ;; -+ # default to option 3 -+ *) ;; - esac - - # save old log diff --git a/app-forensics/rkhunter/rkhunter-1.3.4-r2.ebuild b/app-forensics/rkhunter/rkhunter-1.3.4-r2.ebuild new file mode 100644 index 000000000000..9031fd1a0e50 --- /dev/null +++ b/app-forensics/rkhunter/rkhunter-1.3.4-r2.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-forensics/rkhunter/rkhunter-1.3.4-r2.ebuild,v 1.1 2009/01/18 00:20:29 patrick Exp $ + +EAPI=2 + +inherit eutils bash-completion + +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="~alpha ~amd64 ~mips ~ppc ~sparc ~x86" +IUSE="" + +RDEPEND="virtual/mta + app-shells/bash + dev-lang/perl + sys-process/lsof" + +S="${WORKDIR}/${P}/files" + +src_prepare() { + epatch "${FILESDIR}/${PN}.conf.patch" + epatch "${FILESDIR}/${PN}-ppc64.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 || die "failed to install ${PN}.conf" + + exeinto /usr/lib/${PN}/scripts + doexe *.pl || die "failed to install scripts" + + insinto /var/lib/${PN}/db + doins *.dat || die "failed to install dat files" + + insinto /var/lib/${PN}/db/i18n + doins i18n/* + + doman ${PN}.8 || die "doman failed" + dodoc ACKNOWLEDGMENTS CHANGELOG FAQ README WISHLIST || die "dodoc failed" + + exeinto /etc/cron.daily + newexe "${FILESDIR}/${PN}-1.3.cron" ${PN} || \ + die "failed to install cron script" + + dobashcompletion "${FILESDIR}/${PN}.bash-completion" +} + +pkg_postinst() { + einfo + einfo "A cron script has been installed to /etc/cron.daily/rkhunter." + einfo "To enable it, edit /etc/cron.daily/rkhunter and follow the" + einfo "directions." + einfo + bash-completion_pkg_postinst +} + |