Bug 1786852
Summary: | SELinux is preventing logrotate from 'getattr' accesses on the plik /var/log/boot.log. | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Leszek Matok <lam> | ||||
Component: | selinux-policy | Assignee: | Zdenek Pytela <zpytela> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 31 | CC: | dwalsh, lvrabec, mclasen, mgrepl, plautrba, rstrode, zpytela | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Unspecified | ||||||
Whiteboard: | abrt_hash:703d2dfce70c9d2e14ce9f45cbe90d9ee08d52a30bcd87ce9476dc7728888249; | ||||||
Fixed In Version: | selinux-policy-3.14.4-45.fc31 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2020-02-01 01:30:46 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Leszek Matok
2019-12-28 12:47:54 UTC
HI, Could you please attach output of: # semanage export Thanks, Lukas. Created attachment 1651334 [details]
semanage export output
Hi Leszek, Are you sure that running restorecon doesn't help? In policy "/var/log/boot.log" is defined as plymouthd_var_log_t and I'm not able to reproduce it. Just to be sure, could you ran restorecon once more? # restorecon -Rv /var/log Thanks, Lukas. Yes, as I wrote in the original report, I can fix (and have fixed) this instantly by doing: restorecon -v /var/log/boot.log But I can also still break it instantly by doing: restorecon -v /var/spool/plymouth/boot.log Of course you might ask why would I break it intentionally, even if there's a command for that ;) The problem is that autorelabel goes through /var/spool after /var/log (at least on my system), so autorelabel mislabels this file, due to it being hardlinked in two locations. And this breaks logrotate operating on said file. If this needs to be hardlinked (as opposed to symbolic link or just configuring plymouth to use /var/log and not /var/spool/plymouth), then perhaps the policy should assign plymouthd_var_log_t label for /var/spool/plymouth/boot.log instead of plymouthd_spool_t? No, I see. Thanks for explanation. Adding fixes: commit 8f465f97ef0153ade576ad203ed6d172cbf263bc (HEAD -> rawhide) Author: Lukas Vrabec <lvrabec> Date: Fri Jan 17 12:04:16 2020 +0100 Label /var/spool/plymouth/boot.log as plymouthd_var_log_t Resolves: rhbz#1786852 This package has changed maintainer in the Fedora. Reassigning to the new maintainer of this component. selinux-policy-3.14.4-45.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-bb42099a17 selinux-policy-3.14.4-45.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report. I confirm the update fixes the issue. Thank you! BTW, just last Friday I encountered exactly the same issue after autorelabel on RHEL 7.6 EUS (selinux-policy-3.13.1-229.el7_6.15), I wonder if this fix will somehow make its way into 7.8, are some of the policy sources shared? Leszek, Please note this bug tracking system is not a mechanism for requesting support for Red Hat Enterprise Linux, and we are not able to guarantee the timeliness or suitability of a resolution. If this issue is critical or in any way time sensitive, please raise a ticket through the regular Red Hat support channels to ensure it receives the proper attention and prioritization to assure a timely resolution. Also note RHEL 7 reached Maintenance Support 1 Phase which means that qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released as they become available. https://access.redhat.com/support/policy/updates/errata/ Yes, I fully understand, I mainly mentioned this as a curious coincidence. Thanks for your patience :) |