Blame SOURCES/scap-security-guide-0.1.37-fix-aide-scan-email-notification-remediation.patch

79aef7
From 082b98eca6f4200cf32744582c5ff1b385ea88db Mon Sep 17 00:00:00 2001
79aef7
From: Nathan Peters <petna01@ca.com>
79aef7
Date: Wed, 20 Dec 2017 14:36:19 -0800
79aef7
Subject: [PATCH 1/2] Updated aide_scan_notification remediation to run cron
79aef7
 job as root
79aef7
79aef7
---
79aef7
 shared/fixes/bash/aide_scan_notification.sh | 2 +-
79aef7
 1 file changed, 1 insertion(+), 1 deletion(-)
79aef7
79aef7
diff --git a/shared/fixes/bash/aide_scan_notification.sh b/shared/fixes/bash/aide_scan_notification.sh
79aef7
index ac63227836..3862b21825 100644
79aef7
--- a/shared/fixes/bash/aide_scan_notification.sh
79aef7
+++ b/shared/fixes/bash/aide_scan_notification.sh
79aef7
@@ -11,6 +11,6 @@ if [ -f /var/spool/cron/root ]; then
79aef7
 fi
79aef7
 
79aef7
 if ! grep -qR '^.*\/usr\/sbin\/aide\s*\-\-check.*\|.*\/bin\/mail\s*-s\s*".*"\s*root@.*$' $CRONTAB $VARSPOOL $CRONDIRS; then
79aef7
-	echo '0 5 * * * /usr/sbin/aide  --check | /bin/mail -s "$(hostname) - AIDE Integrity Check" root@localhost' >> $CRONTAB
79aef7
+	echo '0 5 * * * root /usr/sbin/aide  --check | /bin/mail -s "$(hostname) - AIDE Integrity Check" root@localhost' >> $CRONTAB
79aef7
 fi
79aef7
 
79aef7
79aef7
From 6443aac41c6b28198c762d136805aaab090be45d Mon Sep 17 00:00:00 2001
79aef7
From: Nathan Peters <petna01@ca.com>
79aef7
Date: Wed, 20 Dec 2017 14:50:36 -0800
79aef7
Subject: [PATCH 2/2] Fixed remediation script aide_scan_notification for
79aef7
 regular grep syntax
79aef7
79aef7
---
79aef7
 shared/fixes/bash/aide_scan_notification.sh | 2 +-
79aef7
 1 file changed, 1 insertion(+), 1 deletion(-)
79aef7
79aef7
diff --git a/shared/fixes/bash/aide_scan_notification.sh b/shared/fixes/bash/aide_scan_notification.sh
79aef7
index 3862b21825..f6908bda64 100644
79aef7
--- a/shared/fixes/bash/aide_scan_notification.sh
79aef7
+++ b/shared/fixes/bash/aide_scan_notification.sh
79aef7
@@ -10,7 +10,7 @@ if [ -f /var/spool/cron/root ]; then
79aef7
 	VARSPOOL=/var/spool/cron/root
79aef7
 fi
79aef7
 
79aef7
-if ! grep -qR '^.*\/usr\/sbin\/aide\s*\-\-check.*\|.*\/bin\/mail\s*-s\s*".*"\s*root@.*$' $CRONTAB $VARSPOOL $CRONDIRS; then
79aef7
+if ! grep -qR '^.*\/usr\/sbin\/aide\s*\-\-check.*|.*\/bin\/mail\s*-s\s*".*"\s*root@.*$' $CRONTAB $VARSPOOL $CRONDIRS; then
79aef7
 	echo '0 5 * * * root /usr/sbin/aide  --check | /bin/mail -s "$(hostname) - AIDE Integrity Check" root@localhost' >> $CRONTAB
79aef7
 fi
79aef7