From 9e21e2241423332c81e6cecdbca3ffd37020f777 Mon Sep 17 00:00:00 2001 From: Romain Dessort Date: Mon, 11 Sep 2017 10:11:58 -0400 Subject: [PATCH] Check for /etc/evomaintenance.cf permissions --- evocheck.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/evocheck.sh b/evocheck.sh index f874de7..203e209 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -608,7 +608,9 @@ fi # Verification de la configuration d'evomaintenance if [ "$IS_EVOMAINTENANCECONF" = 1 ]; then f=/etc/evomaintenance.cf - ( test -e $f && grep "^export PGPASSWORD" $f |grep -qv "your-passwd" \ + ( test -e $f \ + && test $(stat -c "%a" $f) = "600" \ + && grep "^export PGPASSWORD" $f |grep -qv "your-passwd" \ && grep "^PGDB" $f |grep -qv "your-db" \ && grep "^PGTABLE" $f |grep -qv "your-table" \ && grep "^PGHOST" $f |grep -qv "your-pg-host" \