Do not add dconf value type for login banner text#3679
Do not add dconf value type for login banner text#3679ggbecker merged 7 commits intoComplianceAsCode:masterfrom
Conversation
|
@yuumasato does this change also need to happen in remediation scripts? |
|
@redhatrises I had checked the bash remediation, and it looks good. |
411ad17 to
35a0b13
Compare
|
The inspection completed: 2 new issues |
|
The remediations wont add |
|
@yuumasato do you plan to continue work on this one? Is it possible to merge just part that is ready? |
|
@dahaic Sure, it has been lingering for long. |
|
@yuumasato Could you please rebase? It looks like I don't have rights. The rebase should be easy - only one file has conflicts and they all follow the same pattern - the master branch is wrong, whereas the commit is right. |
The regex was matching the first banner with the second appended. Remediation would also append the second banner along with the first. Note: dod_banners is about a regex to match login banner and short login banner.
- Escaped backlashes in the banner itself, so sed doesn't interpret them. - Introduced readarray to create arrays. - Changed matching of existing keys in keyfiles. - Added double backslash escaping inside double quotes.
305a2b9 to
759cc97
Compare
|
I have rebased and solved some conflicts. |
|
I find it OK, moreover the test suite tests pass as well. |
|
PR seems good. I'll complement with a couple of test scenarios which covers RHEL7 stig profile (dod_banner). Found issues: Still fails to check after remediating. This banner is not used by any profile so it is not a blocker for this PR but test coverage should be increased to include all possible values for this variable. |
|
I've created a new issue to handle the ansible playbook issue (filter out regular expression elements) so the PR doesn't get blocked. #4574 Otherwise LGTM. Merging it. |
Description:
Make regular expression for dconf_gnome_login_banner_text stricterstringduring login banner remediationsRationale:
Lets not matchstringfor comparison with valuelogin_banner_text.stringis not necessary: https://help.gnome.org/admin/system-admin-guide/stable/login-banner.html.en