Under OpenBSD, for 'wheel' group activation detection in sudoers file check if /etc/sudoers exists first

This commit is contained in:
Tristan 2019-03-11 16:02:41 +01:00
parent c90de6ec1f
commit 4c83cf1a28
1 changed files with 3 additions and 1 deletions

View File

@ -934,7 +934,9 @@ if [ `uname -s` == "OpenBSD" ]; then
fi
if [ "$IS_WHEEL" = 1 ]; then
grep -qE "^%wheel.*$" /etc/sudoers || echo 'IS_WHEEL FAILED!'
if test -f /etc/sudoers; then
grep -qE "^%wheel.*$" /etc/sudoers || echo 'IS_WHEEL FAILED!'
fi
fi
if [ "$IS_SUDOADMIN" = 1 ]; then