fix: Avoid find failures on too many files (#144)

Signed-off-by: Tarik Megzari <tarik.megzari@corp.ovh.com>

Co-authored-by: Tarik Megzari <tarik.megzari@corp.ovh.com>
Co-authored-by: GoldenKiwi <thibault.dewailly@corp.ovh.com>
This commit is contained in:
Tarik Megzari
2022-03-02 17:49:28 +01:00
committed by GitHub
parent 20bf51f65b
commit b962155a3c
7 changed files with 25 additions and 25 deletions

View File

@ -19,7 +19,7 @@ DESCRIPTION="Collect use of privileged commands."
SUDO_CMD='sudo -n'
# Find all files with setuid or setgid set
AUDIT_PARAMS=$($SUDO_CMD find / -xdev \( -perm -4000 -o -perm -2000 \) -type f |
AUDIT_PARAMS=$($SUDO_CMD find / -xdev -ignore_readdir_race \( -perm -4000 -o -perm -2000 \) -type f |
awk '{print "-a always,exit -F path=" $1 " -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged" }')
FILE='/etc/audit/audit.rules'