diff --git a/bin/hardening/1.5.1_bootloader_ownership.sh b/bin/hardening/1.5.1_bootloader_ownership.sh index 80267e8..7aaf6d9 100755 --- a/bin/hardening/1.5.1_bootloader_ownership.sh +++ b/bin/hardening/1.5.1_bootloader_ownership.sh @@ -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