mirror of
https://github.com/ovh/debian-cis.git
synced 2025-06-24 03:24:34 +02:00
IMP(shellcheck): quote variables (SC2086)
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user