Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1647714

Summary: /etc/selinux/fixfiles_exclude_dirs and /etc/selinux//targeted/contexts/files/file_contexts.local
Product: Red Hat Enterprise Linux 7 Reporter: Franky Van Liedekerke <franky>
Component: policycoreutilsAssignee: Vit Mojzis <vmojzis>
Status: CLOSED ERRATA QA Contact: Jan Zarsky <jzarsky>
Severity: medium Docs Contact: Mirek Jahoda <mjahoda>
Priority: high    
Version: 7.6CC: dwalsh, fkrska, jzarsky, lvrabec, mjahoda, mmalik, plautrba, ssekidde, zpytela
Target Milestone: rcKeywords: Regression, ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
.`fixfiles` no longer incorrectly fails Previously, the `fixfiles` script failed if the `/etc/selinux/fixfiles_exclude_dirs` file contained at least one entry and the `/etc/selinux/targeted/contexts/files/file_contexts.local` file was not present. With this update, the requirement for existence of `/etc/selinux/targeted/contexts/files/file_contexts.local` has been removed, and fixfiles now works correctly in the described scenario.
Story Points: ---
Clone Of:
: 1665813 (view as bug list) Environment:
Last Closed: 2019-08-06 13:00:15 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: 1665813    

Description Franky Van Liedekerke 2018-11-08 08:22:53 UTC
Description of problem:
In bug #1559808, there has been an addition to fixfiles to take into account /etc/selinux/targeted/contexts/files/file_contexts.local if /etc/selinux/fixfiles_exclude_dirs exists and contains something to exclude.
The problem is that /etc/selinux/targeted/contexts/files/file_contexts.local doesn't always exist, so fixfiles and autorelabel fail.
Solution is to copy that file in fixfiles only if it exists.

Version-Release number of selected component (if applicable):
policycoreutils-2.5-29.el7.x86_64


How reproducible:

Steps to Reproduce:
1. install basic RHEL7 (e.g. 7.5 and update to 7.6)
2. /etc/selinux//targeted/contexts/files/file_contexts.local is not present
3. /etc/selinux/fixfiles_exclude_dirs is present and contains an entry (e.g. '/tmp')
4. Run fixfiles

Actual results:
fixfiles it will exit with errorcode since the .local file doesn't exist and so the copy fails

Expected results:
fixfiles should work

Comment 5 Vit Mojzis 2019-01-09 16:50:03 UTC
Thank you for reporting the issue. We are working on a resolution.

Comment 12 errata-xmlrpc 2019-08-06 13:00:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2160