mirror of
https://github.com/ovh/debian-cis.git
synced 2025-07-14 21:02:18 +02:00
12.11_find_sgid_files.sh
This commit is contained in:
@ -19,16 +19,15 @@ audit () {
|
||||
for BINARY in $RESULT; do
|
||||
if grep -q $BINARY <<< "$EXCEPTIONS"; then
|
||||
debug "$BINARY is confirmed as an exception"
|
||||
|
||||
RESULT=$(sed '!'"$BINARY"'!d' <<< $RESULT)
|
||||
RESULT=$(sed "s!$BINARY!!" <<< $RESULT)
|
||||
fi
|
||||
done
|
||||
if [ ! -z "$RESULT" ]; then
|
||||
crit "Some world writable file are present"
|
||||
crit "Some suid files are present"
|
||||
FORMATTED_RESULT=$(sed "s/ /\n/g" <<< $RESULT | sort | uniq | tr '\n' ' ')
|
||||
crit "$FORMATTED_RESULT"
|
||||
else
|
||||
ok "No world writable files found"
|
||||
ok "No unknown suid files found"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user