mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-25 15:01:22 +01:00
FIX(test/10.2): backup and restore /etc/passwd after test
This commit is contained in:
parent
a4969e6ba6
commit
5a1a70bbd3
@ -1,5 +1,7 @@
|
||||
# run-shellcheck
|
||||
test_audit() {
|
||||
cp -a /etc/passwd /tmp/passwd.bak
|
||||
|
||||
describe Running on blank host
|
||||
register_test retvalshouldbe 1
|
||||
# shellcheck disable=2154
|
||||
@ -12,4 +14,6 @@ test_audit() {
|
||||
describe Checking resolved state
|
||||
register_test retvalshouldbe 0
|
||||
run resolved /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||
|
||||
mv /tmp/passwd.bak /etc/passwd
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user