more permissions check with stat
This commit is contained in:
parent
057cb7026a
commit
9dcdd8202e
12
evocheck.sh
12
evocheck.sh
|
@ -403,13 +403,17 @@ if is_debian; then
|
|||
fi
|
||||
|
||||
if [ "$IS_NRPEPERMS" = 1 ]; then
|
||||
test -d /etc/nagios && ls -ld /etc/nagios | grep -q "drwxr-x---" \
|
||||
|| failed "IS_NRPEPERMS"
|
||||
if test -d /etc/nagios; then
|
||||
actual=$(stat --format "%A" /etc/nagios)
|
||||
expected="drwxr-x---"
|
||||
test "$expected" = "$actual" || failed "IS_NRPEPERMS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$IS_MINIFWPERMS" = 1 ]; then
|
||||
ls -l "$MINIFW_FILE" | grep -q -- "-rw-------" \
|
||||
|| failed "IS_MINIFWPERMS"
|
||||
actual=$(stat --format "%A" $MINIFW_FILE)
|
||||
expected="-rw-------"
|
||||
test "$expected" = "$actual" || failed "IS_MINIFWPERMS"
|
||||
fi
|
||||
|
||||
if [ "$IS_NRPEDISKS" = 1 ]; then
|
||||
|
|
Loading…
Reference in a new issue