-
Notifications
You must be signed in to change notification settings - Fork 706
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
81 changed files
with
3,562 additions
and
2,266 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
linux_os/guide/services/fapolicyd/fapolicy_default_deny/ansible/shared.yml
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,31 @@ | ||
# platform = multi_platform_all | ||
# reboot = false | ||
# strategy = restrict | ||
# complexity = low | ||
# disruption = low | ||
|
||
- name: {{{ rule_title }}} - Ensure a Final Rule Denying Everything | ||
ansible.builtin.copy: | ||
content: | | ||
# Red Hat KCS 7003854 (https://access.redhat.com/solutions/7003854) | ||
deny perm=any all : all | ||
dest: /etc/fapolicyd/rules.d/99-deny-everything.rules | ||
owner: root | ||
group: fapolicyd | ||
mode: '0644' | ||
register: result_fapolicyd_final_rule | ||
|
||
- name: {{{ rule_title }}} - Ensure fapolicyd is Not Permissive | ||
ansible.builtin.lineinfile: | ||
path: /etc/fapolicyd/fapolicyd.conf | ||
regexp: '^(permissive\s*=).*$' | ||
line: '\1 0' | ||
backrefs: true | ||
register: result_fapolicyd_enforced | ||
|
||
- name: "{{{ rule_title }}} - Restart fapolicyd If Permissive Mode or Final Rule is Changed" | ||
ansible.builtin.service: | ||
name: fapolicyd | ||
state: restarted | ||
when: | ||
- result_fapolicyd_final_rule is changed or result_fapolicyd_enforced is changed |
24 changes: 24 additions & 0 deletions
24
linux_os/guide/services/fapolicyd/fapolicy_default_deny/bash/shared.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,24 @@ | ||
# platform = multi_platform_all | ||
# reboot = false | ||
# strategy = restrict | ||
# complexity = low | ||
# disruption = low | ||
|
||
cat > /etc/fapolicyd/rules.d/99-deny-everything.rules << EOF | ||
# Red Hat KCS 7003854 (https://access.redhat.com/solutions/7003854) | ||
deny perm=any all : all | ||
EOF | ||
|
||
chmod 644 /etc/fapolicyd/rules.d/99-deny-everything.rules | ||
chgrp fapolicyd /etc/fapolicyd/rules.d/99-deny-everything.rules | ||
|
||
{{{ set_config_file(path="/etc/fapolicyd/fapolicyd.conf", | ||
parameter="permissive", | ||
value="0", | ||
create=true, | ||
insensitive=true, | ||
separator=" = ", | ||
separator_regex="\s*=\s*", | ||
prefix_regex="^\s*") }}} | ||
|
||
systemctl restart fapolicyd |
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
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
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
|
||
GRP_NAME=sugroup | ||
groupadd ${GRP_NAME} | ||
groupmems -g ${GRP_NAME} -p | ||
gpasswd -M '' ${GRP_NAME} |
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
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
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
4 changes: 3 additions & 1 deletion
4
...s/guide/system/selinux/selinux_context_elevation_for_sudo/tests/conflicting_value.fail.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
4 changes: 3 additions & 1 deletion
4
...tem/selinux/selinux_context_elevation_for_sudo/tests/correct_value_multiple_files.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
4 changes: 3 additions & 1 deletion
4
...system/selinux/selinux_context_elevation_for_sudo/tests/correct_value_single_file.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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# platform = multi_platform_ol | ||
#!/bin/bash | ||
|
||
# platform = multi_platform_all | ||
# packages = sudo | ||
|
||
echo '%wheel ALL=(ALL) TYPE=sysadm_t ROLE=sysadm_r ALL' >> /etc/sudoers.d/01-complianceascode.conf |
8 changes: 8 additions & 0 deletions
8
...s/guide/system/selinux/selinux_context_elevation_for_sudo/tests/custom_group_name.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,8 @@ | ||
#!/bin/bash | ||
|
||
# platform = multi_platform_all | ||
# packages = sudo | ||
|
||
group_add sudoers | ||
|
||
echo '%sudoers ALL=(ALL) TYPE=sysadm_t ROLE=sysadm_r ALL' >> /etc/sudoers.d/01-complianceascode.conf |
4 changes: 3 additions & 1 deletion
4
linux_os/guide/system/selinux/selinux_context_elevation_for_sudo/tests/missing_role.fail.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
4 changes: 3 additions & 1 deletion
4
linux_os/guide/system/selinux/selinux_context_elevation_for_sudo/tests/missing_type.fail.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
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
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
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
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
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
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
617 changes: 314 additions & 303 deletions
617
...es/disa-stig-rhel7-v3r12-xccdf-manual.xml → ...es/disa-stig-rhel7-v3r13-xccdf-manual.xml
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.