aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorerwin <erwin@FreeBSD.org>2006-09-10 23:40:17 +0800
committererwin <erwin@FreeBSD.org>2006-09-10 23:40:17 +0800
commit93e1f6d4779176a84a95506d096acab44318730e (patch)
tree173406d838ac251d1f72b6ab355ec53293c79420 /security
parentb1aef0008bdb3262bbe13e13a432bd8621d1efb3 (diff)
downloadfreebsd-ports-gnome-93e1f6d4779176a84a95506d096acab44318730e.tar.gz
freebsd-ports-gnome-93e1f6d4779176a84a95506d096acab44318730e.tar.zst
freebsd-ports-gnome-93e1f6d4779176a84a95506d096acab44318730e.zip
- Add periodic script to ease the maintenance
- Bump PORTREVISION PR: 102968 Submitted by: Gabor Kovesdan <gabor@FreeBSD.org>
Diffstat (limited to 'security')
-rw-r--r--security/rkhunter/Makefile7
-rw-r--r--security/rkhunter/files/415.rkhunter.in33
-rw-r--r--security/rkhunter/pkg-message16
-rw-r--r--security/rkhunter/pkg-plist3
4 files changed, 52 insertions, 7 deletions
diff --git a/security/rkhunter/Makefile b/security/rkhunter/Makefile
index 0f3504275210..990fa9b2284d 100644
--- a/security/rkhunter/Makefile
+++ b/security/rkhunter/Makefile
@@ -7,7 +7,7 @@
PORTNAME= rkhunter
PORTVERSION= 1.2.8
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= security
MASTER_SITES= http://downloads.rootkit.nl/
@@ -23,6 +23,7 @@ RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Digest/SHA1.pm:${PORTSDIR}/security/p5-D
WRKSRC= ${WRKDIR}/${PORTNAME}
USE_PERL5= yes
NO_BUILD= yes
+SUB_FILES= 415.rkhunter
MAN8= rkhunter.8
MANCOMPRESSED= no
@@ -42,12 +43,14 @@ RUN_DEPENDS+= nmap:${PORTSDIR}/security/nmap
do-install:
cd ${WRKSRC} && ./installer.sh --installdir ${PREFIX}
${INSTALL_MAN} ${WRKSRC}/files/development/rkhunter.8 ${MAN8PREFIX}/man/man8
+ @${MKDIR} ${PREFIX}/etc/periodic/security
+ ${INSTALL_SCRIPT} ${WRKDIR}/415.rkhunter ${PREFIX}/etc/periodic/security
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/files/|} ${DOCSDIR}
.endif
post-install:
- @${CAT} ${PKGMESSAGE}
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/security/rkhunter/files/415.rkhunter.in b/security/rkhunter/files/415.rkhunter.in
new file mode 100644
index 000000000000..c481308f20e9
--- /dev/null
+++ b/security/rkhunter/files/415.rkhunter.in
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# This is a maintenance shell script for the rkhunter security tool.
+# You can enable this script in /etc/periodic.conf file by putting these lines into it:
+# daily_rkhunter_update_enable="YES"
+# daily_rkhunter_check_enable="YES"
+#
+# Written by: Gabor Kovesdan <gabor@FreeBSD.org>
+
+if [ -r /etc/defaults/periodic.conf ]; then
+ . /etc/defaults/periodic.conf
+ source_periodic_confs
+fi
+
+case "$daily_rkhunter_update_enable" in
+ [Yy][Ee][Ss])
+
+ echo ""
+ echo "Updating the rkhunter database..."
+ %%PREFIX%%/bin/rkhunter --update
+ ;;
+esac
+
+case "$daily_rkhunter_check_enable" in
+ [Yy][Ee][Ss])
+
+ echo ""
+ echo "Running rkhunter..."
+ %%PREFIX%%/bin/rkhunter --checkall --cronjob --skip-keypress
+ ;;
+esac
diff --git a/security/rkhunter/pkg-message b/security/rkhunter/pkg-message
index c8e5d0bdf02c..fcb59d58bb6f 100644
--- a/security/rkhunter/pkg-message
+++ b/security/rkhunter/pkg-message
@@ -1,8 +1,14 @@
-**********************************************
-NOTICE:
+******************************************************************************
- Keep your database up-to-date by running
- "rkhunter --update" frequently.
+You should keep your rkhunter database up-to-date.
+This can be done automatically by putting this line to /etc/periodic.conf:
-**********************************************
+daily_rkhunter_update_enable="YES"
+
+Also, you can run rkhunter as a part of the daily security check by
+putting this line to /etc/periodic.conf:
+
+daily_rkhunter_check_enable="YES"
+
+******************************************************************************
diff --git a/security/rkhunter/pkg-plist b/security/rkhunter/pkg-plist
index ee338b225d74..422d647d4846 100644
--- a/security/rkhunter/pkg-plist
+++ b/security/rkhunter/pkg-plist
@@ -1,6 +1,7 @@
bin/rkhunter
@unexec if cmp -s %D/etc/rkhunter.conf %D/etc/rkhunter.conf.sample; then rm -f %D/etc/rkhunter.conf; fi
etc/rkhunter.conf.sample
+etc/periodic/security/415.rkhunter
lib/rkhunter/db/backdoorports.dat
lib/rkhunter/db/defaulthashes.dat
lib/rkhunter/db/md5blacklist.dat
@@ -17,3 +18,5 @@ lib/rkhunter/scripts/showfiles.pl
@dirrm lib/rkhunter/scripts
@dirrm lib/rkhunter/db
@dirrm lib/rkhunter
+@dirrmtry etc/periodic/security
+@dirrmtry etc/periodic