Modify audit method for 11.1
This commit is contained in:
parent
24fd4aacc2
commit
ba36181d3a
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
#
|
||||
# harbian audit 7/8/9 Hardening
|
||||
# harbian audit 7/8/9 or CentOS8 Hardening
|
||||
#
|
||||
|
||||
#
|
||||
|
@ -21,6 +21,11 @@ FILES='/etc/motd /etc/issue /etc/issue.net'
|
|||
# This function will be called if the script status is on enabled / audit mode
|
||||
audit () {
|
||||
for FILE in $FILES; do
|
||||
does_file_exist $FILE
|
||||
if [ $FNRET != 0 ]; then
|
||||
warn "$FILE does not exist"
|
||||
continue
|
||||
fi
|
||||
has_file_correct_ownership $FILE $USER $GROUP
|
||||
if [ $FNRET = 0 ]; then
|
||||
ok "$FILE has correct ownership"
|
||||
|
|
Loading…
Reference in New Issue