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.
Description of problem:
By reading mail log and running qshape utility produces Postfix PMDA (pmdapostfix) several statistics about postfix queue and mail flow though the system. pmdapostfix is ran by pmcd daemon, and asked to provide metrics. However selinux-policy disallows access to /var/log/maillog and Postfix queue directories. These AVC denials are raised when pmdapostfix is installed and during its usage:
type=AVC msg=audit(1429602211.057:2688): avc: denied { read } for pid=4801 comm="perl" name="maillog" dev="dm-0" ino=68460443 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file
type=AVC msg=audit(1429602211.057:2688): avc: denied { open } for pid=4801 comm="perl" path="/var/log/maillog" dev="dm-0" ino=68460443 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file
type=AVC msg=audit(1429602216.087:2689): avc: denied { read } for pid=4810 comm="postconf" name="main.cf" dev="dm-0" ino=1013985 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:postfix_etc_t:s0 tclass=file
type=AVC msg=audit(1429602216.087:2689): avc: denied { open } for pid=4810 comm="postconf" path="/etc/postfix/main.cf" dev="dm-0" ino=1013985 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:postfix_etc_t:s0 tclass=file
type=AVC msg=audit(1429602216.087:2690): avc: denied { getattr } for pid=4810 comm="postconf" path="/etc/postfix/main.cf" dev="dm-0" ino=1013985 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:postfix_etc_t:s0 tclass=file
type=AVC msg=audit(1429602216.087:2691): avc: denied { search } for pid=4809 comm="qshape" name="postfix" dev="dm-0" ino=68620051 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:postfix_spool_t:s0 tclass=dir
type=AVC msg=audit(1429602216.087:2692): avc: denied { getattr } for pid=4809 comm="qshape" path="/var/spool/postfix/maildrop" dev="dm-0" ino=135531171 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:postfix_spool_maildrop_t:s0 tclass=dir
type=AVC msg=audit(1429602216.137:2693): avc: denied { getattr } for pid=4811 comm="qshape" path="/var/spool/postfix/incoming" dev="dm-0" ino=68620053 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:postfix_spool_t:s0 tclass=dir
As you can see, access to /etc/postfix/main.cf is also necessary - pmcd runs pmdapostfix (as a daemon-ed process) which calls qshape which calls postconf - which reads main.cf - to get e.g. postfix's queue directory.
Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-23.el7.noarch
pcp-3.9.10-8
How reproducible:
Steps to Reproduce:
1. cd /var/lib/pcp/pmdas/postfix
2. ./Install
3. pminfo -f postfix
Actual results:
AVCs raised, and error message "pmdapostfix(27060) Error: open failed (/var/log/maillog): Permission denied" appears in /var/log/pcp/pmcd/postfix.log
Expected results:
Additional info:
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2015-2300.html
Description of problem: By reading mail log and running qshape utility produces Postfix PMDA (pmdapostfix) several statistics about postfix queue and mail flow though the system. pmdapostfix is ran by pmcd daemon, and asked to provide metrics. However selinux-policy disallows access to /var/log/maillog and Postfix queue directories. These AVC denials are raised when pmdapostfix is installed and during its usage: type=AVC msg=audit(1429602211.057:2688): avc: denied { read } for pid=4801 comm="perl" name="maillog" dev="dm-0" ino=68460443 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file type=AVC msg=audit(1429602211.057:2688): avc: denied { open } for pid=4801 comm="perl" path="/var/log/maillog" dev="dm-0" ino=68460443 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file type=AVC msg=audit(1429602216.087:2689): avc: denied { read } for pid=4810 comm="postconf" name="main.cf" dev="dm-0" ino=1013985 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:postfix_etc_t:s0 tclass=file type=AVC msg=audit(1429602216.087:2689): avc: denied { open } for pid=4810 comm="postconf" path="/etc/postfix/main.cf" dev="dm-0" ino=1013985 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:postfix_etc_t:s0 tclass=file type=AVC msg=audit(1429602216.087:2690): avc: denied { getattr } for pid=4810 comm="postconf" path="/etc/postfix/main.cf" dev="dm-0" ino=1013985 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:postfix_etc_t:s0 tclass=file type=AVC msg=audit(1429602216.087:2691): avc: denied { search } for pid=4809 comm="qshape" name="postfix" dev="dm-0" ino=68620051 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:postfix_spool_t:s0 tclass=dir type=AVC msg=audit(1429602216.087:2692): avc: denied { getattr } for pid=4809 comm="qshape" path="/var/spool/postfix/maildrop" dev="dm-0" ino=135531171 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:postfix_spool_maildrop_t:s0 tclass=dir type=AVC msg=audit(1429602216.137:2693): avc: denied { getattr } for pid=4811 comm="qshape" path="/var/spool/postfix/incoming" dev="dm-0" ino=68620053 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:postfix_spool_t:s0 tclass=dir As you can see, access to /etc/postfix/main.cf is also necessary - pmcd runs pmdapostfix (as a daemon-ed process) which calls qshape which calls postconf - which reads main.cf - to get e.g. postfix's queue directory. Version-Release number of selected component (if applicable): selinux-policy-3.13.1-23.el7.noarch pcp-3.9.10-8 How reproducible: Steps to Reproduce: 1. cd /var/lib/pcp/pmdas/postfix 2. ./Install 3. pminfo -f postfix Actual results: AVCs raised, and error message "pmdapostfix(27060) Error: open failed (/var/log/maillog): Permission denied" appears in /var/log/pcp/pmcd/postfix.log Expected results: Additional info: