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:
@ -24,11 +24,11 @@ audit() {
|
||||
RESULT=$(get_db passwd | cut -f1 -d":" | sort -n | uniq -c | awk '{print $1":"$2}')
|
||||
for LINE in $RESULT; do
|
||||
debug "Working on line $LINE"
|
||||
OCC_NUMBER=$(awk -F: '{print $1}' <<<$LINE)
|
||||
USERNAME=$(awk -F: '{print $2}' <<<$LINE)
|
||||
if [ $OCC_NUMBER -gt 1 ]; then
|
||||
OCC_NUMBER=$(awk -F: '{print $1}' <<<"$LINE")
|
||||
USERNAME=$(awk -F: '{print $2}' <<<"$LINE")
|
||||
if [ "$OCC_NUMBER" -gt 1 ]; then
|
||||
# shellcheck disable=2034
|
||||
USERS=$(awk -F: '($3 == n) { print $1 }' n=$USERNAME /etc/passwd | xargs)
|
||||
USERS=$(awk -F: '($3 == n) { print $1 }' n="$USERNAME" /etc/passwd | xargs)
|
||||
ERRORS=$((ERRORS + 1))
|
||||
crit "Duplicate username $USERNAME"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user