Bug 1286361 - SELinux is preventing pmcd from 'read' accesses on the file pmlogger_daily.pid.
SELinux is preventing pmcd from 'read' accesses on the file pmlogger_daily.pid.
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: pcp (Show other bugs)
23
x86_64 Unspecified
medium Severity medium
: ---
: ---
Assigned To: Nathan Scott
Fedora Extras Quality Assurance
abrt_hash:0dc8ebe8c003e68f0bc79425863...
:
: 1259127 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-28 09:46 EST by Patrick C. F. Ernzer
Modified: 2016-04-06 10:55 EDT (History)
17 users (show)

See Also:
Fixed In Version: pcp-3.11.1-1.fc24 pcp-3.11.1-1.fc23 pcp-3.11.1-1.fc22 pcp-3.11.1-1.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-26 13:55:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Patrick C. F. Ernzer 2015-11-28 09:46:18 EST
Description of problem:
probably a dupe of the F22 Bug 1259127 
SELinux is preventing pmcd from 'read' accesses on the file pmlogger_daily.pid.

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

If you believe that pmcd should be allowed read access on the pmlogger_daily.pid 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:
# grep pmcd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:pcp_pmcd_t:s0
Target Context                system_u:object_r:cron_var_run_t:s0
Target Objects                pmlogger_daily.pid [ file ]
Source                        pmcd
Source Path                   pmcd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-154.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.6-300.fc23.x86_64 #1 SMP Tue
                              Nov 10 19:32:21 UTC 2015 x86_64 x86_64
Alert Count                   5
First Seen                    2015-11-09 00:10:12 CET
Last Seen                     2015-11-28 00:10:12 CET
Local ID                      8beccc5e-9cd6-4776-940e-178fc9355de2

Raw Audit Messages
type=AVC msg=audit(1448665812.838:1908): avc:  denied  { read } for  pid=1773 comm="pmcd" name="pmlogger_daily.pid" dev="tmpfs" ino=16490635 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:cron_var_run_t:s0 tclass=file permissive=0


Hash: pmcd,pcp_pmcd_t,cron_var_run_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-154.fc23.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.6-300.fc23.x86_64
type:           libreport

Potential duplicate: bug 1259127
Comment 1 Miroslav Grepl 2016-01-21 10:21:38 EST
Is "pmlogger_daily.pid" created by cron?
Comment 3 Lukas Vrabec 2016-02-25 09:15:44 EST
pcp folks, 
Any help here?
Comment 4 Lukas Berk 2016-02-25 09:39:58 EST
(In reply to Miroslav Grepl from comment #1)
> Is "pmlogger_daily.pid" created by cron?

cron runs a pmlogger admin/maintenance script (pmlogger_daily), which is what leads to this pmlogger_daily.pid file being created and (attempted to be) read.

$ cat /etc/cron.d/pcp-pmlogger

# Performance Co-Pilot crontab entries for a monitored site
# with one or more pmlogger instances running
#
# daily processing of archive logs (with compression enabled)
10     0  *  *  *  pcp  /usr/libexec/pcp/bin/pmlogger_daily -X xz -x 3
# every 30 minutes, check pmlogger instances are running
25,55  *  *  *  *  pcp  /usr/libexec/pcp/bin/pmlogger_check -C
Comment 5 Nathan Scott 2016-02-25 16:18:58 EST
*** Bug 1259127 has been marked as a duplicate of this bug. ***
Comment 6 Nathan Scott 2016-02-25 16:27:45 EST
I believe this will be coming from pmdapmcd which lives as a DSO inside pmcd, and the "pmcd.services" PCP metric.

We can restrict evaluation of those PID files to a subset of core services for that metric - we don't really need to report on pmlogger_daily.pid, so its not a problem that the access fails here (other than the AVC denial warnings its generating of course).

I'll fix this up in PCP.
Comment 7 Fedora Update System 2016-03-21 10:45:02 EDT
pcp-3.11.1-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-90112fb9ca
Comment 8 Fedora Update System 2016-03-21 10:46:37 EDT
pcp-3.11.1-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e687eabad0
Comment 9 Fedora Update System 2016-03-21 10:48:12 EDT
pcp-3.11.1-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-4969de37e5
Comment 10 Fedora Update System 2016-03-21 10:49:34 EDT
pcp-3.11.1-1.el5 has been submitted as an update to Fedora EPEL 5. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-5b519318e0
Comment 11 Fedora Update System 2016-03-21 18:30:44 EDT
pcp-3.11.1-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-90112fb9ca
Comment 12 Fedora Update System 2016-03-21 20:17:18 EDT
pcp-3.11.1-1.el5 has been pushed to the Fedora EPEL 5 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-5b519318e0
Comment 13 Fedora Update System 2016-03-21 21:26:26 EDT
pcp-3.11.1-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-4969de37e5
Comment 14 Fedora Update System 2016-03-22 11:22:39 EDT
pcp-3.11.1-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e687eabad0
Comment 15 Fedora Update System 2016-03-26 13:55:41 EDT
pcp-3.11.1-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
Comment 16 Fedora Update System 2016-03-30 16:53:42 EDT
pcp-3.11.1-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 17 Fedora Update System 2016-03-30 17:20:02 EDT
pcp-3.11.1-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 18 Fedora Update System 2016-04-06 10:53:31 EDT
pcp-3.11.1-1.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.

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