Skip to content

Commit

Permalink
Simplify regex to handle comments properly.
Browse files Browse the repository at this point in the history
This closes the issue in #316.

Update regex for RHEL-08-010830 so the basic comment line will not affect the final result.

Signed-off-by: Daniel Linder <[email protected]>
  • Loading branch information
dglinder authored Dec 12, 2024
1 parent a1a1d37 commit 19b3ad1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/fix-cat2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2723,7 +2723,7 @@
- name: "MEDIUM | RHEL-08-010830 | PATCH | RHEL 8 must not allow users to override SSH environment variables."
ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config
regexp: '(?i)^#?PermitUserEnvironment'
regexp: '(?i)^PermitUserEnvironment'
line: 'PermitUserEnvironment no'
validate: '/usr/sbin/sshd -T -f %s'
notify: restart sshd
Expand Down

0 comments on commit 19b3ad1

Please sign in to comment.