IMP(shellcheck): quote variables (SC2086)

This commit is contained in:
Thibault Ayanides
2020-12-07 16:49:11 +01:00
parent e2f7426664
commit 6826f377e6
68 changed files with 294 additions and 294 deletions

View File

@ -22,7 +22,7 @@ EXPECTED_GID='0'
# This function will be called if the script status is on enabled / audit mode
audit() {
if [ $(grep "^root:" /etc/passwd | cut -f4 -d:) = 0 ]; then
if [ "$(grep "^root:" /etc/passwd | cut -f4 -d:)" = 0 ]; then
ok "Root group has GID $EXPECTED_GID"
else
crit "Root group GID should be $EXPECTED_GID"
@ -31,7 +31,7 @@ audit() {
# This function will be called if the script status is on enabled mode
apply() {
if [ $(grep "^root:" /etc/passwd | cut -f4 -d:) = 0 ]; then
if [ "$(grep "^root:" /etc/passwd | cut -f4 -d:)" = 0 ]; then
ok "Root group GID is $EXPECTED_GID"
else
warn "Root group GID is not $EXPECTED_GID -- Fixing"