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 1444990 - SELinux is preventing /usr/bin/python2.7 from 'execute' accesses on the file /usr/bin/hostname.
Summary: SELinux is preventing /usr/bin/python2.7 from 'execute' accesses on the file ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.4
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard: abrt_hash:16b4c96c04a8ebbf61556d3a2ae...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-24 17:13 UTC by Matěj Cepl
Modified: 2017-06-28 17:42 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-28 17:42:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1447722 0 high CLOSED rhsmcertd-worker: Error reading networking information: [Errno 13] Permission denied 2021-02-22 00:41:40 UTC

Internal Links: 1447722

Description Matěj Cepl 2017-04-24 17:13:10 UTC
Description of problem:
SELinux is preventing /usr/bin/python2.7 from 'execute' accesses on the file /usr/bin/hostname.

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

If you believe that python2.7 should be allowed execute access on the hostname file 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 -i my-rhsmcertdworke.pp

Additional Information:
Source Context                system_u:system_r:rhsmcertd_t:s0
Target Context                system_u:object_r:hostname_exec_t:s0
Target Objects                /usr/bin/hostname [ file ]
Source                        rhsmcertd-worke
Source Path                   /usr/bin/python2.7
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           hostname-3.13-3.el7.x86_64
Policy RPM                    selinux-policy-3.13.1-144.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.0-655.el7.x86_64 #1 SMP Wed
                              Apr 19 00:03:43 EDT 2017 x86_64 x86_64
Alert Count                   114
First Seen                    2017-04-18 19:41:35 CEST
Last Seen                     2017-04-24 18:59:35 CEST
Local ID                      d2a6abd4-21e5-4804-8dc8-a28cf2e75953

Raw Audit Messages
type=AVC msg=audit(1493053175.973:17194): avc:  denied  { execute } for  pid=5465 comm="rhsmcertd-worke" name="hostname" dev="dm-0" ino=272802 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:hostname_exec_t:s0 tclass=file


Hash: rhsmcertd-worke,rhsmcertd_t,hostname_exec_t,file,execute

Version-Release number of selected component:
selinux-policy-3.13.1-144.el7.noarch

Additional info:
reporter:       libreport-2.1.11.1
hashmarkername: setroubleshoot
kernel:         3.10.0-655.el7.x86_64
reproducible:   Not sure how to reproduce the problem
type:           libreport

Comment 5 Kevin Howell 2017-05-05 20:43:05 UTC
Unfortunately, this causes inconsistencies in the facts reported by subscription-manager and its daemon (rhsmcertd). The easiest solution to bug 1447722 without regressing on bug 1401394 is to get this bug resolved, though we are open to suggestions for alternative solutions.

Comment 6 Milos Malik 2017-05-09 15:55:09 UTC
I believe this bug is a duplicate of BZ#1445494.

Comment 7 Kevin Howell 2017-06-28 17:42:57 UTC
This was resolved by a different implementation in bug 1445494, so closing as NOTABUG, since the new implementation does not have this problem.


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