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 1664650

Summary: Invalid selinux context for files under /etc/authselect
Product: Red Hat Enterprise Linux 8 Reporter: Pavel Březina <pbrezina>
Component: authselectAssignee: Pavel Březina <pbrezina>
Status: CLOSED CURRENTRELEASE QA Contact: Steeve Goveas <sgoveas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: eng-l10n-bugs, ljanda, smaitra, wchadwic
Target Milestone: rcFlags: rule-engine: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: authselect-1.0-10.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-14 01:43:36 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:

Description Pavel Březina 2019-01-09 11:54:46 UTC
Authselect first writes a temporary files and then renames them to their location under /etc/authselect. This however, sets the selinux context to unconfined_u:object_r:etc_t:s0 instead of system_u:object_r:etc_t:s0.

Steps to Reproduce:
1. Run 'authselect select sssd --force'
2. Check context 'ls -lZ /etc/authselect'

Actual results:
Context is unconfined_u:object_r:etc_t:s0.

Expected results:
Context is system_u:object_r:etc_t:s0.

Additional info:
Can be fixed manually with 'restorecon -RvF /etc/authselect'.

Comment 2 Pavel Březina 2019-01-09 12:28:38 UTC
$ ll -Z /etc/authselect
total 44
-rw-r--r--. 1 root root system_u:object_r:etc_t:s0       52 Jan  9 12:52 authselect.conf
drwxr-xr-x. 2 root root system_u:object_r:etc_t:s0     4096 Jan  7 13:08 custom
-rw-r--r--. 1 root root unconfined_u:object_r:etc_t:s0  231 Jan  9 12:52 dconf-db
-rw-r--r--. 1 root root unconfined_u:object_r:etc_t:s0  205 Jan  9 12:52 dconf-locks
-rw-r--r--. 1 root root unconfined_u:object_r:etc_t:s0   91 Jan  9 12:52 fingerprint-auth
-rw-r--r--. 1 root root unconfined_u:object_r:etc_t:s0 1232 Jan  9 12:52 nsswitch.conf
-rw-r--r--. 1 root root unconfined_u:object_r:etc_t:s0 1970 Jan  9 12:52 password-auth
-rw-r--r--. 1 root root unconfined_u:object_r:etc_t:s0  399 Jan  9 12:52 postlogin
-rw-r--r--. 1 root root unconfined_u:object_r:etc_t:s0   91 Jan  9 12:52 smartcard-auth
-rw-r--r--. 1 root root unconfined_u:object_r:etc_t:s0 1970 Jan  9 12:52 system-auth
-rw-r--r--. 1 root root system_u:object_r:etc_t:s0      381 Oct 11 13:49 user-nsswitch.conf