Bug 593649

Summary: wrong labels on /var/cache/yum/anaconda-
Product: Red Hat Enterprise Linux 6 Reporter: Peter Vrabec <pvrabec>
Component: anacondaAssignee: Chris Lumens <clumens>
Status: CLOSED CURRENTRELEASE QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0CC: atodorov, dwalsh, ebenes, ksrot
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-13.21.46-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-02 20:49:45 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:

Description Peter Vrabec 2010-05-19 11:58:40 UTC
Description of problem:
I see these wrong SELinux labels on files on clean RHEL6 installation:

    Warning: Mislabeled directory '/var/cache/yum/anaconda-RedHatEnterpriseLinux-201005121618.i386' found. Labeled as 'system_u:object_r:root_t:s0', should be 'system_u:object_r:rpm_var_cache_t:s0'.
    Warning: Mislabeled regular file '/var/cache/yum/anaconda-RedHatEnterpriseLinux-201005121618.i386/3ac865dd799fd5fd1beb2621b56b05314e092d910b969a9529832b1baab0dd2c-comps-rhel6-Server.xml.gz' found. Labeled as 'system_u:object_r:root_t:s0', should be 'system_u:object_r:rpm_var_cache_t:s0'.
    Warning: Mislabeled regular file '/var/cache/yum/anaconda-RedHatEnterpriseLinux-201005121618.i386/887dc56b401a1527102ab3d2fb09c7c305283d1388106aea434b6af69e4207fe-comps-rhel6-Server.xml' found. Labeled as 'system_u:object_r:root_t:s0', should be 'system_u:object_r:rpm_var_cache_t:s0'.
    Warning: Mislabeled regular file '/var/cache/yum/anaconda-RedHatEnterpriseLinux-201005121618.i386/f39fe2cc357d4c87b6a5630ea29315bb5502c045d8891b844947afb13dba9c77-primary.sqlite' found. Labeled as 'system_u:object_r:root_t:s0', should be 'system_u:object_r:rpm_var_cache_t:s0'.
    Warning: Mislabeled regular file '/var/cache/yum/anaconda-RedHatEnterpriseLinux-201005121618.i386/repomd.xml' found. Labeled as 'system_u:object_r:root_t:s0', should be 'system_u:object_r:rpm_var_cache_t:s0'.
    Warning: Mislabeled regular file '/var/cache/yum/anaconda-RedHatEnterpriseLinux-201005121618.i386/cachecookie' found. Labeled as 'system_u:object_r:root_t:s0', should be 'system_u:object_r:rpm_var_cache_t:s0'.
    Warning: Mislabeled regular file '/var/cache/yum/anaconda-RedHatEnterpriseLinux-201005121618.i386/e647f7293ceb25a4adf28885e87fec20ee12f758f902575f06ec5d09816797fa-filelists.sqlite' found. Labeled as 'system_u:object_r:root_t:s0', should be 'system_u:object_r:rpm_var_cache_t:s0'.

When I asked Dan W. what was the problem I get reply:
"Please open a bug in Anaconda on this.  They do not set the autorelabel
flag nor should they.  We need to add this directory to the list of
directories anaconda runs restorecon on when it completes."

Comment 2 Daniel Walsh 2010-05-19 12:41:32 UTC
This file must be being created early in the install process.  Including /var/cache/yum.  Not sure why they get the correct label, or this file is created in / and then mv'd to this directory.

Anaconda should run restorecon on this file after it is mv'd/created in this directory.

Comment 3 Chris Lumens 2010-05-20 15:38:13 UTC
The real question here is why /var/cache/yum even exists post-install.  We should be cleaning that up before rebooting.

Comment 4 RHEL Program Management 2010-05-24 19:26:25 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 6 Alexander Todorov 2010-05-31 11:18:11 UTC
With snap #6 (0527.2)/anaconda 13.21.48 after install /var/cache/yum is empty.
/var/cache/yum has the context system_u:object_r:rpm_var_cache_t:s0

Moving to VERIFIED.

Comment 7 releng-rhel@redhat.com 2010-07-02 20:49:45 UTC
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.