Bug 1885772
| Summary: | /var/log/anaconda/hawkey.log created as rpm_log_t | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Jan Stodola <jstodola> |
| Component: | selinux-policy | Assignee: | Zdenek Pytela <zpytela> |
| Status: | CLOSED WONTFIX | QA Contact: | Milos Malik <mmalik> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 8.3 | CC: | lvrabec, mmalik, plautrba, ssekidde, zpytela |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | 8.0 | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-01-25 19:24:43 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1870493 | ||
|
Description
Jan Stodola
2020-10-06 21:11:07 UTC
Jan, I can see on all my vms with current RHEL release the labels correctly, can you confirm the issue is gone now? I can still reproduce the problem on the latest RHEL-8.6 compose: [root@localhost ~]# rpm -q selinux-policy selinux-policy-3.14.3-86.el8.noarch [root@localhost ~]# rm /var/log/anaconda/hawkey.log rm: remove regular empty file '/var/log/anaconda/hawkey.log'? y [root@localhost ~]# touch /var/log/anaconda/hawkey.log [root@localhost ~]# restorecon -nv /var/log/anaconda/hawkey.log Would relabel /var/log/anaconda/hawkey.log from unconfined_u:object_r:rpm_log_t:s0 to unconfined_u:object_r:var_log_t:s0 [root@localhost ~]# The file is correctly labeled after the installation, because anaconda relabels /var/log/anaconda/ at the end of the installation - see bug 1870493. (In reply to Jan Stodola from comment #5) > I can still reproduce the problem on the latest RHEL-8.6 compose: > > [root@localhost ~]# rpm -q selinux-policy > selinux-policy-3.14.3-86.el8.noarch > [root@localhost ~]# rm /var/log/anaconda/hawkey.log > rm: remove regular empty file '/var/log/anaconda/hawkey.log'? y > [root@localhost ~]# touch /var/log/anaconda/hawkey.log > [root@localhost ~]# restorecon -nv /var/log/anaconda/hawkey.log > Would relabel /var/log/anaconda/hawkey.log from > unconfined_u:object_r:rpm_log_t:s0 to unconfined_u:object_r:var_log_t:s0 > [root@localhost ~]# > > The file is correctly labeled after the installation, because anaconda > relabels /var/log/anaconda/ at the end of the installation - see bug 1870493. SELinux cannot take into account all possible scenarios. I don't think removing a packaged file is a valid scenario as it can be either relabeled using restorecon or restored using rpm/dnf reinstall. Do you happen to have any other use case when this file gets a type different to the default one in file context database? No, I do not have any other use case. As mentioned in comment 5, anaconda "fixed" this problem for freshly installed systems by running restorecon at the end of the installation. It's up to you to decide what to do with this bug, it is not a real problem for us any more. Thank you for the confirmation, closing this bz then, but feel free to reopen it or create a new one in case of outstanding issue. |