mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-22 05:27:01 +01:00
FIX(tests): change sed in conf file disabled->audit following d6172ad
In test cases, changed in sed command "disabled" to "audit" to enable apply part, following this commitd6172ad
Change default status disabled -> audit when no conf file5f28036
- Change default status to audit for file with custom `create_config` (Charles Herlin Thu Feb 14 14:33:21 2019 +0100)
This commit is contained in:
parent
6cbe8f572f
commit
cf42666833
@ -15,7 +15,7 @@ test_audit() {
|
||||
run noncompliant /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||
|
||||
describe correcting situation
|
||||
sed -i 's/disabled/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
sed -i 's/audit/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
/opt/debian-cis/bin/hardening/"${script}".sh --apply || true
|
||||
|
||||
describe Checking resolved state
|
||||
|
@ -15,7 +15,7 @@ test_audit() {
|
||||
run noncompliant /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||
|
||||
describe correcting situation
|
||||
sed -i 's/disabled/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
sed -i 's/audit/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
/opt/debian-cis/bin/hardening/"${script}".sh || true
|
||||
|
||||
describe Checking resolved state
|
||||
|
@ -15,7 +15,7 @@ test_audit() {
|
||||
run noncompliant /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||
|
||||
describe correcting situation
|
||||
sed -i 's/disabled/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
sed -i 's/audit/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
/opt/debian-cis/bin/hardening/"${script}".sh --apply || true
|
||||
|
||||
describe Checking resolved state
|
||||
|
@ -15,7 +15,8 @@ test_audit() {
|
||||
run noncompliant /opt/debian-cis/bin/hardening/"${script}".sh --audit-all
|
||||
|
||||
describe correcting situation
|
||||
sed -i 's/disabled/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
sed -i 's/audit/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
cat /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
/opt/debian-cis/bin/hardening/"${script}".sh --apply || true
|
||||
|
||||
describe Checking resolved state
|
||||
|
@ -11,7 +11,7 @@ test_audit() {
|
||||
# the service needs to be started for the reload to succeed
|
||||
service ssh start
|
||||
# if the audit script provides "apply" option, enable and run it
|
||||
sed -i 's/disabled/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
sed -i 's/audit/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
/opt/debian-cis/bin/hardening/"${script}".sh || true
|
||||
|
||||
describe Checking resolved state
|
||||
|
@ -11,7 +11,7 @@ test_audit() {
|
||||
# the service needs to be started for the reload to succeed
|
||||
service ssh start
|
||||
# if the audit script provides "apply" option, enable and run it
|
||||
sed -i 's/disabled/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
sed -i 's/audit/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
/opt/debian-cis/bin/hardening/"${script}".sh || true
|
||||
|
||||
cp -a /etc/ssh/sshd_config /tmp/sshd_config.bak
|
||||
|
@ -11,7 +11,7 @@ test_audit() {
|
||||
# the service needs to be started for the reload to succeed
|
||||
service ssh start
|
||||
# if the audit script provides "apply" option, enable and run it
|
||||
sed -i 's/disabled/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
sed -i 's/audit/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
/opt/debian-cis/bin/hardening/"${script}".sh || true
|
||||
|
||||
describe Checking resolved state
|
||||
|
@ -11,7 +11,7 @@ test_audit() {
|
||||
# the service needs to be started for the reload to succeed
|
||||
service ssh start
|
||||
# if the audit script provides "apply" option, enable and run it
|
||||
sed -i 's/disabled/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
sed -i 's/audit/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
/opt/debian-cis/bin/hardening/"${script}".sh || true
|
||||
|
||||
describe Checking resolved state
|
||||
|
@ -11,7 +11,7 @@ test_audit() {
|
||||
# the service needs to be started for the reload to succeed
|
||||
service ssh start
|
||||
# if the audit script provides "apply" option, enable and run it
|
||||
sed -i 's/disabled/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
sed -i 's/audit/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
/opt/debian-cis/bin/hardening/"${script}".sh || true
|
||||
|
||||
describe Checking resolved state
|
||||
|
@ -12,7 +12,7 @@ test_audit() {
|
||||
# the service needs to be started for the reload to succeed
|
||||
service ssh start
|
||||
# if the audit script provides "apply" option, enable and run it
|
||||
sed -i 's/disabled/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
sed -i 's/audit/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
/opt/debian-cis/bin/hardening/"${script}".sh || true
|
||||
|
||||
describe Checking resolved state
|
||||
|
@ -19,7 +19,7 @@ test_audit() {
|
||||
# the service needs to be started for the reload to succeed
|
||||
service ssh start
|
||||
# if the audit script provides "apply" option, enable and run it
|
||||
sed -i 's/disabled/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
sed -i 's/audit/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
/opt/debian-cis/bin/hardening/"${script}".sh || true
|
||||
|
||||
describe Checking resolved state
|
||||
|
@ -11,7 +11,7 @@ test_audit() {
|
||||
# the service needs to be started for the reload to succeed
|
||||
service ssh start
|
||||
# if the audit script provides "apply" option, enable and run it
|
||||
sed -i 's/disabled/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
sed -i 's/audit/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
/opt/debian-cis/bin/hardening/"${script}".sh || true
|
||||
|
||||
describe Checking resolved state
|
||||
|
@ -11,7 +11,7 @@ test_audit() {
|
||||
# the service needs to be started for the reload to succeed
|
||||
service ssh start
|
||||
# if the audit script provides "apply" option, enable and run it
|
||||
sed -i 's/disabled/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
sed -i 's/audit/enabled/' /opt/debian-cis/etc/conf.d/"${script}".cfg
|
||||
/opt/debian-cis/bin/hardening/"${script}".sh || true
|
||||
|
||||
describe Checking resolved state
|
||||
|
Loading…
Reference in New Issue
Block a user