Bug 1286361 - SELinux is preventing pmcd from 'read' accesses on the file pmlogger_daily.pid.
Summary: SELinux is preventing pmcd from 'read' accesses on the file pmlogger_daily.pid.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pcp
Version: 23
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Nathan Scott
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:0dc8ebe8c003e68f0bc79425863...
: 1259127 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-28 14:46 UTC by Patrick C. F. Ernzer
Modified: 2016-04-06 14:55 UTC (History)
17 users (show)

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:
Clone Of:
Environment:
Last Closed: 2016-03-26 17:55:56 UTC


Attachments (Terms of Use)

Description Patrick C. F. Ernzer 2015-11-28 14:46:18 UTC
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 15:21:38 UTC
Is "pmlogger_daily.pid" created by cron?

Comment 3 Lukas Vrabec 2016-02-25 14:15:44 UTC
pcp folks, 
Any help here?

Comment 4 Lukas Berk 2016-02-25 14:39:58 UTC
(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 21:18:58 UTC
*** Bug 1259127 has been marked as a duplicate of this bug. ***

Comment 6 Nathan Scott 2016-02-25 21:27:45 UTC
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 14:45:02 UTC
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 14:46:37 UTC
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 14:48:12 UTC
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 14:49:34 UTC
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 22:30:44 UTC
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-22 00:17:18 UTC
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-22 01:26:26 UTC
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 15:22:39 UTC
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 17:55:41 UTC
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 20:53:42 UTC
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 21:20:02 UTC
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 14:53:31 UTC
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.