diff --git a/tests/test_security_features.sh b/tests/test_security_features.sh index b141fbe..7f2cb39 100755 --- a/tests/test_security_features.sh +++ b/tests/test_security_features.sh @@ -67,7 +67,12 @@ if [ -f host_key ]; then fi # Check permissions - PERMS=$(stat -f "%OLp" host_key) + if [[ "$OSTYPE" == "darwin"* ]]; then + PERMS=$(stat -f "%OLp" host_key) + else + PERMS=$(stat -c "%a" host_key) + fi + if [ "$PERMS" = "600" ]; then pass "Host key has secure permissions (600)" else