mirror of
https://github.com/ovh/debian-cis.git
synced 2024-12-22 22:15:24 +01:00
Allow grub.cfg permission to be 600 (#121)
Co-authored-by: GoldenKiwi <thibault.dewailly@corp.ovh.com>
This commit is contained in:
parent
7266ec7cb4
commit
1a874b2b35
@ -23,6 +23,7 @@ FILE='/boot/grub/grub.cfg'
|
||||
USER='root'
|
||||
GROUP='root'
|
||||
PERMISSIONS='400'
|
||||
PERMISSIONSOK='400 600'
|
||||
|
||||
# This function will be called if the script status is on enabled / audit mode
|
||||
audit() {
|
||||
@ -33,7 +34,7 @@ audit() {
|
||||
crit "$FILE ownership was not set to $USER:$GROUP"
|
||||
fi
|
||||
|
||||
has_file_correct_permissions "$FILE" "$PERMISSIONS"
|
||||
has_file_one_of_permissions "$FILE" "$PERMISSIONSOK"
|
||||
if [ "$FNRET" = 0 ]; then
|
||||
ok "$FILE has correct permissions"
|
||||
else
|
||||
@ -51,7 +52,7 @@ apply() {
|
||||
chown "$USER":"$GROUP" "$FILE"
|
||||
fi
|
||||
|
||||
has_file_correct_permissions "$FILE" "$PERMISSIONS"
|
||||
has_file_one_of_permissions "$FILE" "$PERMISSIONSOK"
|
||||
if [ "$FNRET" = 0 ]; then
|
||||
ok "$FILE has correct permissions"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user