Skip to content

Commit

Permalink
Update audit_rules_suid_privilege_function to use ExecStart instead o…
Browse files Browse the repository at this point in the history
…f ExecStartPost.

RHEL10 does not use the old ExecStartPost directive anymore.
  • Loading branch information
ggbecker committed Oct 28, 2024
1 parent cf53352 commit 35b36c7
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@

{{% set rx_end = "(?:-k[\s]+|-F[\s]+key=)[\S]+[\s]*$" %}}

{{%- set exec_start_directive = 'ExecStartStop' %}}
{{%- if product in ["rhel10"] %}}
{{%- set exec_start_directive = 'ExecStart' %}}
{{%- endif %}}

- name: Service facts
ansible.builtin.service_facts:

- name: Check the rules script being used
ansible.builtin.command:
grep '^ExecStartPost' /usr/lib/systemd/system/auditd.service
grep '^{{{ exec_start_directive }}}' /usr/lib/systemd/system/auditd.service
register: check_rules_scripts_result
changed_when: false
failed_when: false
Expand Down

0 comments on commit 35b36c7

Please sign in to comment.