mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-22 21:47:02 +01:00
Fix SOC-28, add test if file exist, if not issue error
This commit is contained in:
parent
b1f85d3f99
commit
51f589923d
@ -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
|
# This function will be called if the script status is on enabled / audit mode
|
||||||
audit () {
|
audit () {
|
||||||
for FILE in $FILES; do
|
for FILE in $FILES; do
|
||||||
|
does_file_exist $FILE
|
||||||
|
if [ $FNRET != 0 ]; then
|
||||||
|
crit "$FILE does not exist"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
has_file_correct_ownership $FILE $USER $GROUP
|
has_file_correct_ownership $FILE $USER $GROUP
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$FILE has correct ownership"
|
ok "$FILE has correct ownership"
|
||||||
|
Loading…
Reference in New Issue
Block a user