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
Describe the Issue
Rule 5.4.2 looks for a pattern in /etc/pam.d/common-auth and changes a line to meet a regular expression. But the line it is changed to is not consistent with the line it is search for, so it will result in multiple lines addressing the same concern.
Describe the Issue
Rule 5.4.2 looks for a pattern in /etc/pam.d/common-auth and changes a line to meet a regular expression. But the line it is changed to is not consistent with the line it is search for, so it will result in multiple lines addressing the same concern.
The test looks for regexp
^auth\s+required pam_tally2 .*onerr=fail.*
But it inserts:
auth required pam_tally2.so {{ ubtu20cis_pamtally2_login_opts }}
Since the insert "pam_tally2.so[:space:]" can never match the search "pam_tally2[:space:]", the PATCH will apply every time the rule is run.
Expected Behavior
If a matching line is found, it is updated to the specified content rather than inserting a new line
Actual Behavior
A new line gets inserted which does not match the test expression (in worst case, this new line will get inserted on every test run).
Control(s) Affected
5.4.2
Environment (please complete the following information):
Additional Notes
Anything additional goes here
Possible Solution
Make regex match the inserted line.
PR coming.
The text was updated successfully, but these errors were encountered: