Bug 1529742

Summary: SELinux prevents zabbix-agent from running rpm
Product: Red Hat Enterprise Linux 7 Reporter: Orion Poplawski <orion>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED DUPLICATE QA Contact: Milos Malik <mmalik>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.4CC: lvrabec, mgrepl, mmalik, plautrba, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-10 20:13:08 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 Orion Poplawski 2017-12-29 18:02:42 UTC
Description of problem:

The zabbix agent can collect package information, but SELinux blocks this.  From permissive mode:

type=AVC msg=audit(1514570217.067:316881): avc:  denied  { execute } for  pid=337 comm="sh" name="rpm" dev="vda2" ino=106947835 scontext=system_u:system_r:zabbix_agent_t:s0 tcontext=system_u:object_r:rpm_exec_t:s0 tclass=file
type=AVC msg=audit(1514570217.070:316882): avc:  denied  { execute_no_trans } for  pid=338 comm="sh" path="/usr/bin/rpm" dev="vda2" ino=106947835 scontext=system_u:system_r:zabbix_agent_t:s0 tcontext=system_u:object_r:rpm_exec_t:s0 tclass=file
type=AVC msg=audit(1514570217.158:316883): avc:  denied  { open } for  pid=340 comm="rpm" path="/var/lib/rpm/Packages" dev="vda2" ino=33554571 scontext=system_u:system_r:zabbix_agent_t:s0 tcontext=system_u:object_r:rpm_var_lib_t:s0 tclass=file

Perhaps this should be made a boolean, although if only read access is given perhaps it's not very sensitive.

Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-166.el7_4.7.noarch

Comment 2 Lukas Vrabec 2018-06-10 20:13:08 UTC

*** This bug has been marked as a duplicate of bug 1347052 ***