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 1707138

Summary: SELinux is preventing /var/lib/pcp/pmdas/linux/pmdalinux from unix_read access on the semaphore labeled postgresql_t.
Product: Red Hat Enterprise Linux 7 Reporter: Ryan Blakley <rblakley>
Component: pcpAssignee: pcp-maint <pcp-maint>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.6CC: fche, lberk, mgoodwin, nathans, patrickm, ubellavance
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-10 02:05:19 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 Ryan Blakley 2019-05-06 21:24:50 UTC
Description of problem: SELinux is preventing /var/lib/pcp/pmdas/linux/pmdalinux from unix_read access on the semaphore labeled postgresql_t.

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

If you believe that pmdalinux should be allowed unix_read access on sem labeled postgresql_t 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 'pmdalinux' --raw | audit2allow -M my-pmdalinux
# semodule -i my-pmdalinux.pp


Additional Information:
Source Context                system_u:system_r:pcp_pmcd_t:s0
Target Context                system_u:system_r:postgresql_t:s0
Target Objects                Unknown [ sem ]
Source                        pmdalinux
Source Path                   /var/lib/pcp/pmdas/linux/pmdalinux
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           pcp-4.1.0-5.el7_6.x86_64
Target RPM Packages
Policy RPM                    selinux-policy-3.13.1-229.el7_6.9.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 15
                              17:36:42 UTC 2018 x86_64 x86_64
Alert Count                   567903
First Seen                    2019-02-02 21:47:23 EST
Last Seen                     2019-05-03 09:42:01 EDT
Local ID                      07cd1f19-d3ab-4af1-a35b-aecd62e849f5

Raw Audit Messages
type=AVC msg=audit(1556890921.92:3681779): avc:  denied  { unix_read } for  pid=5798 comm="pmdalinux" key=5432003  scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:system_r:postgresql_t:s0 tclass=sem permissive=0


type=SYSCALL msg=audit(1556890921.92:3681779): arch=x86_64 syscall=semctl success=no exit=EACCES a0=3 a1=0 a2=12 a3=7ffca8a34c60 items=0 ppid=5760 pid=5798 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=pmdalinux exe=/var/lib/pcp/pmdas/linux/pmdalinux subj=system_u:system_r:pcp_pmcd_t:s0 key=(null)


Additional info: 
Found a similar bz in fedora that was for shm instead of sem, not sure if it helps or not. https://bugzilla.redhat.com/show_bug.cgi?id=1618756