1 |
unnilennium |
1.1 |
diff -up smeserver-rkhunter-1.2.0/createlinks.maipatch smeserver-rkhunter-1.2.0/createlinks |
2 |
|
|
--- smeserver-rkhunter-1.2.0/createlinks.maipatch 2009-04-02 16:46:09.000000000 -0400 |
3 |
|
|
+++ smeserver-rkhunter-1.2.0/createlinks 2013-06-20 18:01:13.000000000 -0400 |
4 |
|
|
@@ -8,5 +8,7 @@ for my $event (qw( |
5 |
|
|
)) |
6 |
|
|
{ |
7 |
|
|
templates2events("/etc/rkhunter.conf", $event) |
8 |
|
|
+ ; templates2events("/etc/sysconfig/rkhunter", $event); |
9 |
|
|
+ templates2events("/etc/cron.daily/rkhunter", $event); |
10 |
|
|
} |
11 |
|
|
|
12 |
|
|
diff -up smeserver-rkhunter-1.2.0/root/etc/e-smith/templates/etc/cron.daily/rkhunter/10script.maipatch smeserver-rkhunter-1.2.0/root/etc/e-smith/templates/etc/cron.daily/rkhunter/10script |
13 |
|
|
--- smeserver-rkhunter-1.2.0/root/etc/e-smith/templates/etc/cron.daily/rkhunter/10script.maipatch 2013-06-20 17:52:06.000000000 -0400 |
14 |
|
|
+++ smeserver-rkhunter-1.2.0/root/etc/e-smith/templates/etc/cron.daily/rkhunter/10script 2013-06-20 17:56:01.000000000 -0400 |
15 |
|
|
@@ -0,0 +1,58 @@ |
16 |
|
|
+#!/bin/sh |
17 |
|
|
+# 01-rkhunter A shell script to update and run rkhunter via CRON |
18 |
|
|
+ |
19 |
|
|
+XITVAL=0 |
20 |
|
|
+ |
21 |
|
|
+# Get a secure tempfile |
22 |
|
|
+TMPFILE1=`/bin/mktemp -p /var/lib/rkhunter rkhcronlog.XXXXXXXXXX` || exit 1 |
23 |
|
|
+ |
24 |
|
|
+if [ ! -e /var/lock/subsys/rkhunter ]; then |
25 |
|
|
+ |
26 |
|
|
+ # Try to keep the SysInit boot scan from colliding with us (highly unlikely) |
27 |
|
|
+ /bin/touch /var/lock/subsys/rkhunter |
28 |
|
|
+ |
29 |
|
|
+ # Source system configuration parameters. |
30 |
|
|
+ if [ -e /etc/sysconfig/rkhunter ] ; then |
31 |
|
|
+ . /etc/sysconfig/rkhunter |
32 |
|
|
+ else |
33 |
unnilennium |
1.2 |
+ { my $mail = $rkhunter{'mail'} || "root"; $OUT .= "MAILTO= $mail";} |
34 |
unnilennium |
1.1 |
+ fi |
35 |
|
|
+ |
36 |
|
|
+ # If a diagnostic mode scan was requested, setup the parameters |
37 |
|
|
+ if [ "$DIAG_SCAN" == "yes" ]; then |
38 |
|
|
+ RKHUNTER_FLAGS="--checkall --skip-keypress --nocolors --quiet --appendlog --display-logfile" |
39 |
|
|
+ else |
40 |
|
|
+ RKHUNTER_FLAGS="--cronjob --nocolors --report-warnings-only" |
41 |
|
|
+ fi |
42 |
|
|
+ |
43 |
|
|
+ # Set a few critical parameters |
44 |
|
|
+ RKHUNTER=/usr/bin/rkhunter |
45 |
|
|
+ LOGFILE=/var/log/rkhunter/rkhunter.log |
46 |
|
|
+ |
47 |
|
|
+ # Run RootKit Hunter if available |
48 |
|
|
+ if [ -x $RKHUNTER ]; then |
49 |
|
|
+ /bin/echo -e "\n--------------------- Start Rootkit Hunter Update ---------------------" \ |
50 |
|
|
+ > $TMPFILE1 |
51 |
|
|
+ /bin/nice -n 10 $RKHUNTER --update --nocolors 2>&1 >> $TMPFILE1 |
52 |
|
|
+ /bin/echo -e "\n---------------------- Start Rootkit Hunter Scan ----------------------" \ |
53 |
|
|
+ >> $TMPFILE1 |
54 |
|
|
+ /bin/nice -n 10 $RKHUNTER $RKHUNTER_FLAGS 2>&1 >> $TMPFILE1 |
55 |
|
|
+ XITVAL=$? |
56 |
|
|
+ /bin/echo -e "\n----------------------- End Rootkit Hunter Scan -----------------------" \ |
57 |
|
|
+ >> $TMPFILE1 |
58 |
|
|
+ |
59 |
|
|
+ if [ $XITVAL != 0 ]; then |
60 |
|
|
+ /bin/cat $TMPFILE1 | /bin/mail -s "rkhunter Daily Run on $(hostname)" $MAILTO |
61 |
|
|
+ fi |
62 |
|
|
+ /bin/cat $TMPFILE1 >> $LOGFILE |
63 |
|
|
+ fi |
64 |
|
|
+ |
65 |
|
|
+ # Delete the gating lockfile |
66 |
|
|
+ /bin/rm -f /var/lock/subsys/rkhunter |
67 |
|
|
+fi |
68 |
|
|
+ |
69 |
|
|
+# Delete the secure tempfile |
70 |
|
|
+/bin/rm -f $TMPFILE1 |
71 |
|
|
+ |
72 |
|
|
+exit $XITVAL |
73 |
|
|
+ |
74 |
|
|
diff -up smeserver-rkhunter-1.2.0/root/etc/e-smith/templates/etc/cron.daily/rkhunter/template-begin.maipatch smeserver-rkhunter-1.2.0/root/etc/e-smith/templates/etc/cron.daily/rkhunter/template-begin |
75 |
|
|
diff -up smeserver-rkhunter-1.2.0/root/etc/e-smith/templates/etc/cron.daily/rkhunter/template-end.maipatch smeserver-rkhunter-1.2.0/root/etc/e-smith/templates/etc/cron.daily/rkhunter/template-end |
76 |
|
|
diff -up smeserver-rkhunter-1.2.0/root/etc/e-smith/templates/etc/sysconfig/rkhunter/09warning.maipatch smeserver-rkhunter-1.2.0/root/etc/e-smith/templates/etc/sysconfig/rkhunter/09warning |
77 |
|
|
--- smeserver-rkhunter-1.2.0/root/etc/e-smith/templates/etc/sysconfig/rkhunter/09warning.maipatch 2013-06-20 17:57:17.000000000 -0400 |
78 |
|
|
+++ smeserver-rkhunter-1.2.0/root/etc/e-smith/templates/etc/sysconfig/rkhunter/09warning 2013-06-20 17:57:29.000000000 -0400 |
79 |
|
|
@@ -0,0 +1,11 @@ |
80 |
|
|
+#------------------------------------------------------------ |
81 |
|
|
+# !!DO NOT MODIFY THIS FILE!! |
82 |
|
|
+# |
83 |
|
|
+# Manual changes will be lost when this file is regenerated. |
84 |
|
|
+# |
85 |
|
|
+# Please read the developer's guide, which is available |
86 |
|
|
+# at http://www.contribs.org/development/ |
87 |
|
|
+# |
88 |
|
|
+# Copyright (C) 1999-2006 Mitel Networks Corporation |
89 |
|
|
+#------------------------------------------------------------ |
90 |
|
|
+ |
91 |
|
|
diff -up smeserver-rkhunter-1.2.0/root/etc/e-smith/templates/etc/sysconfig/rkhunter/10config.maipatch smeserver-rkhunter-1.2.0/root/etc/e-smith/templates/etc/sysconfig/rkhunter/10config |
92 |
|
|
--- smeserver-rkhunter-1.2.0/root/etc/e-smith/templates/etc/sysconfig/rkhunter/10config.maipatch 2013-06-20 17:54:33.000000000 -0400 |
93 |
|
|
+++ smeserver-rkhunter-1.2.0/root/etc/e-smith/templates/etc/sysconfig/rkhunter/10config 2013-06-20 17:56:35.000000000 -0400 |
94 |
|
|
@@ -0,0 +1,11 @@ |
95 |
|
|
+# System configuration file for Rootkit Hunter which |
96 |
|
|
+# stores RPM system specifics for cron run, etc. |
97 |
|
|
+# |
98 |
|
|
+# MAILTO= <email address to send scan report> |
99 |
|
|
+# DIAG_SCAN= no - perform normal report scan |
100 |
|
|
+# yes - perform detailed report scan |
101 |
|
|
+# (includes application check) |
102 |
|
|
+ |
103 |
|
|
+{ $OUT .= "MAILTO= ". $rkhunter{'mail'} || "root";} |
104 |
|
|
+DIAG_SCAN=no |
105 |
|
|
+ |