mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-22 05:27:01 +01:00
FIX: quotes in find command, misinterpreted shellcheck advice
This commit is contained in:
parent
71b70a2b8c
commit
9ba0361be0
@ -19,7 +19,8 @@ DESCRIPTION="Find SUID system executables."
|
||||
audit () {
|
||||
info "Checking if there are suid files"
|
||||
FS_NAMES=$(df --local -P | awk '{ if (NR!=1) print $6 }' )
|
||||
FOUND_BINARIES=$( $SUDO_CMD find "$FS_NAMES" -xdev -type f -perm -4000 -print)
|
||||
# shellcheck disable=2086
|
||||
FOUND_BINARIES=$( $SUDO_CMD find $FS_NAMES -xdev -type f -perm -4000 -print)
|
||||
BAD_BINARIES=""
|
||||
for BINARY in $FOUND_BINARIES; do
|
||||
if grep -qw "$BINARY" <<< "$EXCEPTIONS"; then
|
||||
|
@ -19,7 +19,8 @@ DESCRIPTION="Find SGID system executables."
|
||||
audit () {
|
||||
info "Checking if there are sgid files"
|
||||
FS_NAMES=$(df --local -P | awk '{ if (NR!=1) print $6 }' )
|
||||
FOUND_BINARIES=$( $SUDO_CMD find "$FS_NAMES" -xdev -type f -perm -2000 -print)
|
||||
# shellcheck disable=2086
|
||||
FOUND_BINARIES=$( $SUDO_CMD find $FS_NAMES -xdev -type f -perm -2000 -print)
|
||||
BAD_BINARIES=""
|
||||
for BINARY in $FOUND_BINARIES; do
|
||||
if grep -qw "$BINARY" <<< "$EXCEPTIONS"; then
|
||||
|
Loading…
Reference in New Issue
Block a user