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

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