Fix check_2 to -le 644

Issue #459 raised that check_2 was only checking for 644 or 600 permissions, this now checks for anything less than or equal to 644.

Signed-off-by: Niall T 19202716+jammasterj89@users.noreply.github.com
This commit is contained in:
jammasterj89 2021-01-15 10:29:11 +00:00 committed by GitHub
parent 8bd04d683f
commit 47e4cc173c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,7 +47,7 @@ check_3_2() {
totalChecks=$((totalChecks + 1))
file="$(get_service_file docker.service)"
if [ -f "$file" ]; then
if [ "$(stat -c %a $file)" -eq 644 ] || [ "$(stat -c %a $file)" -eq 600 ]; then
if [ "$(stat -c %a $file)" -le 644 ]; then
pass "$check_3_2"
resulttestjson "PASS"
currentScore=$((currentScore + 1))