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 1926386 - setfiles fails on file /etc/.ip with ext4 immutable bit set
Summary: setfiles fails on file /etc/.ip with ext4 immutable bit set
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: policycoreutils
Version: 8.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: Petr Lautrbach
QA Contact: Milos Malik
Khushbu Borole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-08 18:54 UTC by Petr Lautrbach
Modified: 2022-04-27 11:15 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
.`setfiles` does not stop on labeling error Previously, the `setfiles` utility stopped whenever it failed to relabel a file. Consequently, mislabeled files were left in the target directory. With this update, `setfiles` skips files it cannot relabel, and as a result, `setfiles` processes all files in the target directory.
Clone Of:
Environment:
Last Closed: 2021-05-18 15:09:18 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Lautrbach 2021-02-08 18:54:29 UTC
Either `setfiles` should not abort when it's not not able to set a new context, or it should provide an option which would on suppress aborting on labeling errors.

Simple reproducer:

$ mkdir -p r/1/1 r/1/2
$ sudo chown root: r/1/2
$ mkdir -p r/2/1 r/2/2
$ setfiles -v -r r /etc/selinux/targeted/contexts/files/file_contexts r
Relabeled r from unconfined_u:object_r:user_tmp_t:s0 to unconfined_u:object_r:root_t:s0
Relabeled r/1 from unconfined_u:object_r:user_tmp_t:s0 to unconfined_u:object_r:default_t:s0
Relabeled r/1/1 from unconfined_u:object_r:user_tmp_t:s0 to unconfined_u:object_r:default_t:s0
setfiles: Could not set context for r/1/2:  Operation not permitted

See https://bugzilla.redhat.com/show_bug.cgi?id=1794518 for more details

Comment 11 errata-xmlrpc 2021-05-18 15:09:18 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 (policycoreutils bug fix and enhancement update), 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-2021:1715

Comment 12 Laszlo Ersek 2022-04-27 09:27:25 UTC
The upstream fix for this seems to be commit 9207823c8ff0 ("setfiles: Do not abort on labeling error", 2021-02-01).


Note You need to log in before you can comment on or make changes to this bug.