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 2159393 - SELinux is preventing /usr/bin/python3.9 from add_name access on the directory /var/log/hawkey.log.
Summary: SELinux is preventing /usr/bin/python3.9 from add_name access on the director...
Keywords:
Status: CLOSED DUPLICATE of bug 2082524
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: selinux-policy
Version: 9.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Nikola Knazekova
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-09 12:47 UTC by Marko Myllynen
Modified: 2023-06-16 10:04 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-06-16 10:04:35 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-144518 0 None None None 2023-01-09 12:51:38 UTC

Description Marko Myllynen 2023-01-09 12:47:22 UTC
Description of problem:
SELinux is preventing /usr/bin/python3.9 from add_name access on the directory /var/log/hawkey.log.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that python3.9 should be allowed add_name access on the hawkey.log directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'rhsmcertd-worke' --raw | audit2allow -M my-rhsmcertdworke
# semodule -X 300 -i my-rhsmcertdworke.pp

Additional Information:
Source Context                system_u:system_r:rhsmcertd_t:s0
Target Context                system_u:object_r:var_log_t:s0
Target Objects                /var/log/hawkey.log [ dir ]
Source                        rhsmcertd-worke
Source Path                   /usr/bin/python3.9
Port                          <Unknown>
Host                          localhost
Source RPM Packages           python3-3.9.14-1.el9_1.1.x86_64
Target RPM Packages           dnf-data-4.12.0-4.el9.noarch
SELinux Policy RPM            selinux-policy-targeted-34.1.43-1.el9.noarch
Local Policy RPM              selinux-policy-targeted-34.1.43-1.el9.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     localhost
Platform                      Linux localhost 5.14.0-162.6.1.el9_1.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Fri Sep 30 07:36:03 EDT 2022
                              x86_64 x86_64
Alert Count                   1
First Seen                    2023-01-09 14:35:13 EET
Last Seen                     2023-01-09 14:35:13 EET
Local ID                      ba401bae-738e-43c2-a841-13644749d0de


Additional info:
Earlier related reports for RHEL 8:

https://bugzilla.redhat.com/show_bug.cgi?id=1720639
https://bugzilla.redhat.com/show_bug.cgi?id=1949871

Comment 1 Nikola Knazekova 2023-01-16 13:33:37 UTC

*** This bug has been marked as a duplicate of bug 1720639 ***

Comment 2 Marko Myllynen 2023-01-16 14:14:36 UTC
This BZ is not resolved on RHEL 9, we need a new errata for this, so this is not a dupe of a two-year old bug. Thanks.

Comment 6 Zdenek Pytela 2023-06-16 10:04:35 UTC
The permission was added with selinux-policy rebase in RHEL 9.2:

       rpm_hawkey_named_filetrans(rhsmcertd_t)

Closing a duplicate.

*** This bug has been marked as a duplicate of bug 2082524 ***


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