You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does not produce the desired PermitUserEnvironment no in the /etc/ssh/sshd_config file; the regex: matches the existing commented-out line which is treated as being already set and the task continues without a change.
I'm not sure what corner cases the '(?i)^#?PermitUserEnvironment' regex was trying to handle, but the base sshd_config file that RHEL-8 provides causes this search to match on the commented out #PermitUserEnvironment no line and determine that there is nothing to change.
When we adjust the regex: - remove the #? - the task is successful.
Suggested fix:
regexp: '(?i)^PermitUserEnvironment'
Note: We saw that #314 was opened and closed with no resolution - reporter found other issues in their environment.
Control(s) Affected
This appears to be strictly for the RHEL-08-010830 control.
Environment (please complete the following information):
An older branch from early 2024
The regex: is still the same as the development branch linked above.
Ansible Version: ansible-core 2.14.13
Host Python Version: unknown
Ansible Server Python Version: unknown
Additional Details: n/a
Additional Notes
Nothing to add.
Possible Solution
Adjust regex: as noted above.
The text was updated successfully, but these errors were encountered:
This closes the issue in ansible-lockdown#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]>
Describe the Issue
While STIG'ing a RHEL-8 system we found that the STIG for RHEL-08-010830 was not being set properly.
Expected Behavior
The
PermitUserEnvironment no
line is setup/confirmed in the/etc/ssh/sshd_config
file.Actual Behavior
Given this initial
/etc/ssh/sshd_conf
had this line:Executing the task in question is this one from
tasks/fix-cat2.yml
, lines 2723..2727:Does not produce the desired
PermitUserEnvironment no
in the/etc/ssh/sshd_config
file; theregex:
matches the existing commented-out line which is treated as beingalready set
and the task continues without a change.I'm not sure what corner cases the '(?i)^#?PermitUserEnvironment' regex was trying to handle, but the base
sshd_config
file that RHEL-8 provides causes this search to match on the commented out#PermitUserEnvironment no
line and determine that there is nothing to change.When we adjust the
regex:
- remove the#?
- the task is successful.Suggested fix:
Note: We saw that #314 was opened and closed with no resolution - reporter found other issues in their environment.
Control(s) Affected
This appears to be strictly for the
RHEL-08-010830
control.Environment (please complete the following information):
regex:
is still the same as the development branch linked above.Additional Notes
Nothing to add.
Possible Solution
Adjust
regex:
as noted above.The text was updated successfully, but these errors were encountered: