Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions products/rhel10/product.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ reference_uris:
journald_conf_dir_path: /etc/systemd/journald.conf.d
audit_watches_style: modern
rsyslog_cafile: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
sysctl_remediate_drop_in_file: true
1 change: 1 addition & 0 deletions products/rhel8/product.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,4 @@ reference_uris:
cis: 'https://www.cisecurity.org/benchmark/red_hat_linux/'

journald_conf_dir_path: /etc/systemd/journald.conf.d
sysctl_remediate_drop_in_file: true
1 change: 1 addition & 0 deletions products/rhel9/product.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ centos_pkg_version: "8483c65d"
centos_major_version: "9"

journald_conf_dir_path: /etc/systemd/journald.conf.d
sysctl_remediate_drop_in_file: true
17 changes: 17 additions & 0 deletions shared/templates/sysctl/tests/correct_value_etc_sysctld.pass.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
{{% if SYSCTLVAL == "" %}}
# variables = sysctl_{{{ SYSCTLID }}}_value={{{ SYSCTL_CORRECT_VALUE }}}
{{% endif %}}

# Clean sysctl config directories
{{% if "ubuntu" in product %}}
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/* /etc/ufw/sysctl.conf
{{% else %}}
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/*
{{% endif %}}

sed -i "/{{{ SYSCTLVAR }}}/d" /etc/sysctl.conf

echo "{{{ SYSCTLVAR }}} = {{{ SYSCTL_CORRECT_VALUE }}}" >> /etc/sysctl.d/duplicate.conf

sysctl -w {{{ SYSCTLVAR }}}="{{{ SYSCTL_CORRECT_VALUE }}}"
2 changes: 1 addition & 1 deletion tests/data/product_stability/rhel10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ release_key_fingerprint: 567E347AD0044ADE55BA8A5F199E2F91FD431D51
rsyslog_cafile: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
sshd_distributed_config: 'true'
sshd_runtime_check: 'false'
sysctl_remediate_drop_in_file: 'false'
sysctl_remediate_drop_in_file: 'true'
target_oval_version:
- 5
- 11
Expand Down
2 changes: 1 addition & 1 deletion tests/data/product_stability/rhel8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ release_key_fingerprint: 567E347AD0044ADE55BA8A5F199E2F91FD431D51
rsyslog_cafile: /etc/pki/tls/cert.pem
sshd_distributed_config: 'false'
sshd_runtime_check: 'false'
sysctl_remediate_drop_in_file: 'false'
sysctl_remediate_drop_in_file: 'true'
target_oval_version:
- 5
- 11
Expand Down
2 changes: 1 addition & 1 deletion tests/data/product_stability/rhel9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ release_key_fingerprint: 567E347AD0044ADE55BA8A5F199E2F91FD431D51
rsyslog_cafile: /etc/pki/tls/cert.pem
sshd_distributed_config: 'true'
sshd_runtime_check: 'false'
sysctl_remediate_drop_in_file: 'false'
sysctl_remediate_drop_in_file: 'true'
target_oval_version:
- 5
- 11
Expand Down
Loading