Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 147897 Details for
Bug 215637
app-forensics/aide ebuild enhancements
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
aide.cron.patch
aide.cron.patch (text/plain), 2.71 KB, created by
Gilles Dartiguelongue (RETIRED)
on 2008-03-31 20:08:48 UTC
(
hide
)
Description:
aide.cron.patch
Filename:
MIME Type:
Creator:
Gilles Dartiguelongue (RETIRED)
Created:
2008-03-31 20:08:48 UTC
Size:
2.71 KB
patch
obsolete
>--- /usr/portage/app-forensics/aide/files/aide.cron 2005-09-30 17:19:38.000000000 +0200 >+++ files/aide.cron 2008-03-31 22:04:50.000000000 +0200 >@@ -29,6 +29,7 @@ > LOGFILE="aide.log" > CONFFILE="/etc/aide/aide.conf" > ERRORLOG="aide_error.log" >+MAILLOG="aide_mail.log" > ERRORTMP=`tempfile --directory "/tmp" --prefix "$ERRORLOG"` > > [ -f /usr/bin/aide ] || exit 0 >@@ -44,10 +45,13 @@ > AIDEARGS="-V4" > > if [ ! -f $DATABASE ]; then >- ( >- echo "Fatal error: The AIDE database does not exist!" >- echo "This may mean you haven't created it, or it may mean that someone has removed it." >- ) | /bin/mail -s "Daily AIDE report for $FQDN" $MAILTO >+ /usr/sbin/sendmail $MAILTO <<EOF >+Subject: Daily AIDE report for $FQDN >+From: root@${FQDN} >+To: ${MAILTO} >+Fatal error: The AIDE database does not exist! >+This may mean you haven't created it, or it may mean that someone has removed it. >+EOF > exit 0 > fi > >@@ -63,7 +67,9 @@ > exit 0 > fi > >-(cat << EOF; >+MAILTMP=`tempfile --directory "/tmp" --prefix "$MAILLOG"` >+ >+(cat << EOF > This is an automated report generated by the Advanced Intrusion Detection > Environment on $FQDN ${DATE}. > >@@ -72,7 +78,7 @@ > # include error log in daily report e-mail > > if [ "$RETVAL" != "0" ]; then >- cat > "$LOGDIR/$ERRORLOG" << EOF; >+ cat > "$LOGDIR/$ERRORLOG" << EOF > > ***************************************************************************** > * aide returned a non-zero exit value * >@@ -89,7 +95,7 @@ > if [ -s "$LOGDIR/$ERRORLOG" ]; then > errorlines=`wc -l "$LOGDIR/$ERRORLOG" | awk '{ print $1 }'` > if [ ${errorlines:=0} -gt $LINES ]; then >- cat << EOF; >+ cat << EOF > > **************************************************************************** > * aide has returned many errors. * >@@ -129,7 +135,7 @@ > if [ -s "$NOISETMP" ]; then > loglines=`< $NOISETMP wc -l | awk '{ print $1 }'` > if [ ${loglines:=0} -gt $LINES ]; then >- cat << EOF; >+ cat << EOF > > **************************************************************************** > * aide has returned long output which has been truncated in this mail * >@@ -155,7 +161,7 @@ > if [ -s "$LOGDIR/$LOGFILE" ]; then > loglines=`wc -l "$LOGDIR/$LOGFILE" | awk '{ print $1 }'` > if [ ${loglines:=0} -gt $LINES ]; then >- cat << EOF; >+ cat << EOF > > **************************************************************************** > * aide has returned long output which has been truncated in this mail * >@@ -172,4 +178,15 @@ > else > echo "AIDE detected no changes." > fi >-) | /bin/mail -s "Daily AIDE report for $FQDN" $MAILTO >+) > ${MAILTMP} >+ >+( >+cat <<EOF >+Subject: Daily AIDE report for $FQDN >+From: root@${FQDN} >+To: ${MAILTO} >+EOF >+cat ${MAILTMP} >+) | /usr/sbin/sendmail $MAILTO >+ >+rm -f "$MAILTMP"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 215637
:
147893
|
147894
|
147896
| 147897