mirror of
https://github.com/ovh/debian-cis.git
synced 2025-06-24 03:24:34 +02:00
IMP(shellcheck): replace ls parsing by stat
This commit is contained in:
@ -27,6 +27,7 @@ ACCEPTED_SHELLS_GREP=''
|
||||
audit() {
|
||||
shells_to_grep_helper
|
||||
info "Checking if admin accounts have a login shell different than $ACCEPTED_SHELLS"
|
||||
# shellcheck disable=SC2086
|
||||
RESULT=$(grep -Ev "^\+" "$FILE" | awk -F: '($1!="root" && $1!="sync" && $1!="shutdown" && $1!="halt" && $3<1000 ) {print}' | grep -v $ACCEPTED_SHELLS_GREP || true)
|
||||
IFS_BAK=$IFS
|
||||
IFS=$'\n'
|
||||
@ -55,6 +56,7 @@ audit() {
|
||||
|
||||
# This function will be called if the script status is on enabled mode
|
||||
apply() {
|
||||
# shellcheck disable=SC2086
|
||||
RESULT=$(grep -Ev "^\+" "$FILE" | awk -F: '($1!="root" && $1!="sync" && $1!="shutdown" && $1!="halt" && $3<1000 ) {print}' | grep -v $ACCEPTED_SHELLS_GREP || true)
|
||||
IFS_BAK=$IFS
|
||||
IFS=$'\n'
|
||||
|
Reference in New Issue
Block a user