ovh/debian-cis

99.1.3_acc_sudoers_no_all.sh: timeout with large sudoers.d/

speed47 opened this issue · 0 comments

The 99.1.3_acc_sudoers_no_all.sh script can sometimes timeout on servers where /etc/sudoers.d/ has thousands of files.

Most of the time is taken by the log function, logging every sudoers.d file, and a good chunk is also taken by unnecessarily sed'ing the $REGEX var in the loop: some optimization can be done.

Preparing a patch.