forked from ComplianceAsCode/content
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ComplianceAsCode#9286 from yuumasato/update_sysctl…
…_rules_with_new_compliant_values Update few sysctl rules to accept multiple compliant values Patch-name: scap-security-guide-0.1.64-add_multivalue_compliance_kptr_rp_filter-PR_9286.patch Patch-status: Update few sysctl rules to accept multiple compliant values
- Loading branch information
Showing
9 changed files
with
112 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...twork_host_and_router_parameters/sysctl_net_ipv4_conf_all_rp_filter/tests/value_1.pass.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
# platform = multi_platform_ol,multi_platform_rhel | ||
|
||
# Clean sysctl config directories | ||
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/* | ||
|
||
sed -i "/net.ipv4.conf.all.rp_filter/d" /etc/sysctl.conf | ||
echo "net.ipv4.conf.all.rp_filter = 1" >> /etc/sysctl.conf | ||
|
||
# set correct runtime value to check if the filesystem configuration is evaluated properly | ||
sysctl -w net.ipv4.conf.all.rp_filter="1" |
11 changes: 11 additions & 0 deletions
11
...twork_host_and_router_parameters/sysctl_net_ipv4_conf_all_rp_filter/tests/value_2.pass.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
# platform = multi_platform_ol,multi_platform_rhel | ||
|
||
# Clean sysctl config directories | ||
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/* | ||
|
||
sed -i "/net.ipv4.conf.all.rp_filter/d" /etc/sysctl.conf | ||
echo "net.ipv4.conf.all.rp_filter = 2" >> /etc/sysctl.conf | ||
|
||
# set correct runtime value to check if the filesystem configuration is evaluated properly | ||
sysctl -w net.ipv4.conf.all.rp_filter="2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,5 @@ interactive: false | |
|
||
options: | ||
default: 1 | ||
disabled: "0" | ||
enabled: 1 | ||
loose: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...restrictions/enable_execshield_settings/sysctl_kernel_kptr_restrict/tests/value_1.pass.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
# platform = multi_platform_ol,multi_platform_rhel | ||
|
||
# Clean sysctl config directories | ||
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/* | ||
|
||
sed -i "/kernel.kptr_restrict/d" /etc/sysctl.conf | ||
echo "kernel.kptr_restrict = 1" >> /etc/sysctl.conf | ||
|
||
# set correct runtime value to check if the filesystem configuration is evaluated properly | ||
sysctl -w kernel.kptr_restrict="1" |
11 changes: 11 additions & 0 deletions
11
...restrictions/enable_execshield_settings/sysctl_kernel_kptr_restrict/tests/value_2.pass.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
# platform = multi_platform_ol,multi_platform_rhel | ||
|
||
# Clean sysctl config directories | ||
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/* | ||
|
||
sed -i "/kernel.kptr_restrict/d" /etc/sysctl.conf | ||
echo "kernel.kptr_restrict = 2" >> /etc/sysctl.conf | ||
|
||
# set correct runtime value to check if the filesystem configuration is evaluated properly | ||
sysctl -w kernel.kptr_restrict="2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,5 @@ interactive: false | |
|
||
options: | ||
default: 1 | ||
0: 0 | ||
1: 1 | ||
2: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,5 @@ interactive: false | |
|
||
options: | ||
default: 2 | ||
0: "0" | ||
1: "1" | ||
2: "2" |