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 2042412

Summary: restorecon would relabel /var/lib/brltty
Product: Red Hat Enterprise Linux 9 Reporter: Jiri Jaburek <jjaburek>
Component: brlttyAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED WONTFIX QA Contact: rhel-cs-infra-services-qe <rhel-cs-infra-services-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: jskarvad, lvrabec, mmalik
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-19 07:28:13 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 Jiri Jaburek 2022-01-19 13:28:44 UTC
Description of problem:

$ dnf install brltty-dracut

$ dracut -f   # needed to create the dir

$ restorecon -Rvvn /var/lib/
Would relabel /var/lib/brltty from unconfined_u:object_r:var_lib_t:s0 to unconfined_u:object_r:brltty_var_lib_t:s0


I've added and audit watch rule prior to the directory being created:

type=PATH msg=audit(1642598013.580:95): item=1 name="/var/lib/brltty" inode=67533312 dev=fd:00 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=unconfined_u:object_r:var_lib_t:s0 nametype=CREATE cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(1642598013.580:95): item=0 name="/var/lib/" inode=134 dev=fd:00 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:var_lib_t:s0 nametype=PARENT cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=CWD msg=audit(1642598013.580:95): cwd="/root"
type=SYSCALL msg=audit(1642598013.580:95): arch=c000003e syscall=83 success=yes exit=0 a0=562b35b31800 a1=1fd a2=562b35b31 a3=0 items=2 ppid=3629 pid=3630 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm="brltty" exe="/usr/bin/brltty" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key="testwatch"

not sure if it helps in identifying the process context.


Version-Release number of selected component (if applicable):
selinux-policy-34.1.22-1.el9

Comment 1 Zdenek Pytela 2022-01-20 09:43:57 UTC
Jarku,

brltty-dracut seems to use /var/lib/brltty, but it is not in the package. Would it be possible to include it so that the directory is created at install time?

Comment 2 Jaroslav Škarvada 2022-01-20 18:23:11 UTC
(In reply to Zdenek Pytela from comment #1)
> Jarku,
> 
> brltty-dracut seems to use /var/lib/brltty, but it is not in the package.
> Would it be possible to include it so that the directory is created at
> install time?

It's created by the brltty binary which is called from the dracut. I think the directory should be provided by the brltty package, otherwise there will be leftover directory (upon brltty uninstallation). Interesting that nobody noticed so far.

Comment 3 Jaroslav Škarvada 2022-01-20 18:34:06 UTC
Fixed in the rawhide (f36).

Comment 4 Zdenek Pytela 2022-01-21 14:37:15 UTC
Based on previous comments switching the component to assess the resolution for RHEL 9, too.

Comment 7 RHEL Program Management 2023-07-19 07:28:13 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.