Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] [RHEL/6] [RHEL/7] Add remediation for 'rpm_verify_permissions' rule #879

Merged

Conversation

iankko
Copy link

@iankko iankko commented Dec 1, 2015

Fixes: #834

Testing report:

The proposed change has been tested manually on recent RHEL-7 system &
AFAICT from testing it's working fine.

Note:

This remediation script will NOT put the system in question into 'fixed'
state. This is because even after performing the remediation (calling
permissions that saved in the RPM database there will remain one unfixed
file path, namely "/var/log/gdm". The issue here being that this is known
bug:
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1277603

reported to downstream bugzilla (till calling "# rpm --setperms gdm"
won't fix the problem also for the "/var/log/gdm" location, the returned
result of this remediation script will be 'error' instead of 'fixed').

But the proper work of this remediation can be verified by running the command:

before and after the remediation and comparing the results (the count of
files reported before the remediation will be higher than count of files
having incorrect permissions after the remediation has finished -- the
only unfixed exception should be "/var/log/gdm" file path and we have
bugs reported downstream for these).

Please review.

Thank you, Jan.

…ssions' rule

Fixes: ComplianceAsCode#834

Testing report:
---------------
The proposed change has been tested manually on recent RHEL-7 system &
AFAICT from testing it's working fine.

Note:
-----
This remediation script will NOT put the system in question into 'fixed'
state. This is because even after performing the remediation (calling
permissions that saved in the RPM database there will remain one unfixed
file path, namely "/var/log/gdm". The issue here being that this is known
bug:
  [1] https://bugzilla.redhat.com/show_bug.cgi?id=1277603

reported to downstream bugzilla (till calling "# rpm --setperms gdm"
won't fix the problem also for the "/var/log/gdm" location, the returned
result of this remediation script will be 'error' instead of 'fixed').

But the proper work of this remediation can be verified by running the command:

before and after the remediation and comparing the results (the count of
files reported before the remediation will be higher than count of files
having incorrect permissions after the remediation has finished -- the
only unfixed exception should be "/var/log/gdm" file path and we have
bugs reported downstream for these).
@iankko iankko added enhancement General enhancements to the project. RHEL6 RHEL Red Hat Enterprise Linux product related. labels Dec 1, 2015
@iankko
Copy link
Author

iankko commented Dec 1, 2015

Tentatively giving to Martin. Of course should someone else be interested into reviewing of this one, feel free to go ahead, test & review.

Thank you, Jan.

@shawndwells
Copy link
Member

Should we insert a note into the XCCDF about the bug?, e.g.
NOTE: Due to a bug in GDM, the RPM verify command may continue to fail even after file permissions have been correctly set on /var/log/gdm. This is being tracked in Red Hat Bugzilla #1277603

@shawndwells
Copy link
Member

ack to the remediation script

@iankko
Copy link
Author

iankko commented Dec 2, 2015

@shawndwells

Should we insert a note into the XCCDF about the bug?, e.g.
NOTE: Due to a bug in GDM, the RPM verify command may continue to fail even after file permissions have been correctly set on /var/log/gdm. This is being tracked in Red Hat Bugzilla #1277603

Good point. Will update the XCCDF prose for both RHEL-6 & RHEL-7 (listing bug numbers there).

Please do not merge yet.

  ComplianceAsCode#879 (comment)

add a <warning> into the RHEL-6 & RHEL-7 XCCDF prose for 'rpm_verify_permissions'
rule explaining that (due to RHEL-6 & RHEL-7 gdm package bugs) the corresponding
OVAL may still fail after performing remediation due to permissions on /var/log/gdm
location still not to be configure properly. Also provide links to corresponding
RHEL-6 and RHEL-7 Red Hat Bugzilla reports.
@iankko
Copy link
Author

iankko commented Dec 2, 2015

Requested <warning> about /var/log/gdm issue added now (both for RHEL-6 & RHEL-7 cases together with listing particular Red Hat Bugzilla IDs for both of the products).

@iankko
Copy link
Author

iankko commented Dec 2, 2015

Safe to be reviewed (once particular Jenkins testing jobs has finished).

@mpreisler mpreisler self-assigned this Dec 2, 2015
@mpreisler
Copy link
Member

The remediation has already been ACK-ed.
ACK to the warning and rationale changes.

mpreisler added a commit that referenced this pull request Dec 2, 2015
[Enhancement] [RHEL/6] [RHEL/7] Add remediation for 'rpm_verify_permissions' rule
@mpreisler mpreisler merged commit f3877f9 into ComplianceAsCode:master Dec 2, 2015
@iankko iankko deleted the rpm_verify_permissions_remediation branch December 2, 2015 17:11
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General enhancements to the project. RHEL Red Hat Enterprise Linux product related.
Projects
None yet
3 participants