Skip to content

Commit

Permalink
Issue #57, #58, #59 fixes and handler items from PR #51
Browse files Browse the repository at this point in the history
Signed-off-by: George Nalen <[email protected]>
  • Loading branch information
georgenalen committed Oct 18, 2021
1 parent 817bce1 commit 1e8f9a3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
9 changes: 5 additions & 4 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,17 @@

- name: confirm grub2 user cfg
stat:
path: /boot/grub2/user.cfg
path: "{{ rhel8stig_grub_cfg_path | dirname }}/user.cfg"
changed_when: rhel8stig_grub2_user_cfg.stat.exists
register: rhel8stig_grub2_user_cfg
notify: make grub2 config

- name: make grub2 config
command: /usr/sbin/grub2-mkconfig --output={{ rhel8stig_grub_cfg_path }}
when:
- rhel7stig_grub2_user_cfg.stat.exists
- not rhel7stig_skip_for_travis
- not rhel7stig_system_is_container
- rhel8stig_grub2_user_cfg.stat.exists
- not rhel8stig_skip_for_travis
- not rhel8stig_system_is_container

- name: copy grub2 config to BIOS/UEFI to satisfy benchmark
listen: make grub2 config
Expand Down
9 changes: 6 additions & 3 deletions tasks/fix-cat2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1194,11 +1194,12 @@
path: '{{ rhel8stig_sssd_conf }}'
regexp: '^certificate_verification = {{ item.regexp }}'
state: "{{ item.state }}"
line: "{{ item.line | default(omit) }}"
with_items:
- { regexp: 'no_ocsp, no_verification', state: absent }
- { regexp: 'no_ocsp', state: absent }
- { regexp: 'no_verification', state: absent }
- { regexp: 'ocsp_dgst=sha1', state: present }
- { regexp: 'ocsp_dgst=sha1', state: present, line: 'certificate_verification = ocsp_dgst=sha1' }
notify: restart sssd
when:
- rhel8stig_sssd_conf_present.stat.exists
Expand Down Expand Up @@ -1269,6 +1270,9 @@

- name: "MEDIUM | RHEL-08-010421 | PATCH | RHEL 8 must clear the page allocator to prevent use-after-free attacks. | Set page poison 1 as active"
shell: grubby --update-kernel=ALL --args="page_poison=1"
when:
- (ansible_proc_cmdline.page_poison is defined and ansible_proc_cmdline.page_poison != '1') or
(ansible_proc_cmdline.page_poison is not defined)

- name: "MEDIUM | RHEL-08-010421 | PATCH | RHEL 8 must clear the page allocator to prevent use-after-free attacks. | Set page poison 1 for kernel updates if doesn't exist"
lineinfile:
Expand Down Expand Up @@ -5618,8 +5622,7 @@
- /usr/sbin/ausearch p+i+n+u+g+s+b+acl+xattrs+sha512
- /usr/sbin/aureport p+i+n+u+g+s+b+acl+xattrs+sha512
- /usr/sbin/autrace p+i+n+u+g+s+b+acl+xattrs+sha512
- /usr/sbin/audisp-remote p+i+n+u+g+s+b+acl+xattrs+sha512
- /usr/sbin/audisp-syslog p+i+n+u+g+s+b+acl+xattrs+sha512
- /usr/sbin/rsyslogd p+i+n+u+g+s+b+acl+xattrs+sha512
- /usr/sbin/augenrules p+i+n+u+g+s+b+acl+xattrs+sha512
when:
- rhel_08_030650
Expand Down
3 changes: 1 addition & 2 deletions templates/aide.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,7 @@ DATAONLY = FIPSR
/usr/sbin/ausearch p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/aureport p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/autrace p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/audisp-remote p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/audisp-syslog p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/rsyslogd p+i+n+u+g+s+b+acl+xattrs+sha512
/usr/sbin/augenrules p+i+n+u+g+s+b+acl+xattrs+sha512


Expand Down

0 comments on commit 1e8f9a3

Please sign in to comment.