Fix a bug space_left of auditd.conf

This commit is contained in:
Samson-W 2021-07-17 22:46:18 +08:00
parent 8ad11ac333
commit e4743a7588
1 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@
#
# 8.1.1.9 Set space left for auditd service (Scored)
# If the value of the "space_left" keyword is set to more than 25 percent of the total partition size, this is a finding.
# Author : Samson wen, Samson <sccxboy@gmail.com>
#
@ -34,7 +35,7 @@ audit () {
FNRET=3
else
SETSIZE=$(grep "^space_left.=.*" $FILE | awk '{printf $3}')
if [ "${SETSIZE}" -lt "${LEFTSIZE}" ]; then
if [ "${SETSIZE}" -gt "${LEFTSIZE}" ]; then
crit "Space left value: ${SETSIZE} is more than audit log filesystem 25%"
FNRET=4
else