Add check for /etc/.git/ permissions.

This commit is contained in:
Romain Dessort 2016-06-16 12:08:22 -04:00
parent 251f02ac1a
commit 16a53a5dc6

View file

@ -69,6 +69,7 @@ IS_KERNELUPTODATE=1
IS_UPTIME=1
IS_MUNINRUNNING=1
IS_BACKUPUPTODATE=1
IS_GITPERMS=1
#Proper to OpenBSD
IS_SOFTDEP=1
@ -427,6 +428,12 @@ if [ -e /etc/debian_version ]; then
fi
done
fi
# Check if /etc/.git/ has read/write permissions for root only.
if [ "$IS_GITPERMS" = 1 ]; then
[ "$(stat -c "%a" /etc/.git/)" = "700" ] || echo 'IS_GITPERMS FAILED!'
fi
fi