mirror of
https://github.com/ovh/debian-cis.git
synced 2025-06-22 02:33:42 +02:00
fix: enhance test 99.1.3 speed for large /etc/sudoers.d folders (#188)
Signed-off-by: Stephane Lesimple <stephane.lesimple@corp.ovh.com>
This commit is contained in:

committed by
GitHub

parent
a6ad528087
commit
6135c3d0e5
@ -28,19 +28,6 @@ test_audit() {
|
||||
register_test contain "[ OK ] jeantestuser ALL = (ALL) NOPASSWD:ALL is present in /etc/sudoers.d/jeantestuser but was EXCUSED because jeantestuser is part of exceptions"
|
||||
run userexcept /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||
|
||||
# testing the MAX_FILES_TO_LOG config option
|
||||
echo 'MAX_FILES_TO_LOG=1' >>/opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
describe Testing with MAX_FILES_TO_LOG=1
|
||||
register_test retvalshouldbe 0
|
||||
register_test contain "won't log every file we check"
|
||||
run maxlogfiles_1 /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||
|
||||
echo 'MAX_FILES_TO_LOG=9999' >>/opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
describe Testing with MAX_FILES_TO_LOG=9999
|
||||
register_test retvalshouldbe 0
|
||||
register_test contain "There is no carte-blanche sudo permission in"
|
||||
run maxlogfiles_9999 /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||
|
||||
rm -f /etc/sudoers.d/jeantestuser
|
||||
userdel jeantestuser
|
||||
}
|
||||
|
Reference in New Issue
Block a user