[ZBX-14626] selinux issue on zabbix-server RHEL 7.5 Created: 2018 Jul 20 Updated: 2018 Sep 25 Resolved: 2018 Sep 25 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Cyril Lopez | Assignee: | Unassigned |
Resolution: | Done | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Comments |
Comment by Cyril Lopez [ 2018 Jul 20 ] |
Similar than The selinux rule missing should be embedded into the RPM: allow zabbix_t zabbix_var_run_t:sock_file create;
LOG: tail /var/log/zabbix/zabbix_server.log ls -lZ /var/run/zabbix/ |
Comment by Cyril Lopez [ 2018 Jul 20 ] |
The workaround from tail /var/log/audit/audit.log | audit2why Was caused by: You can use audit2allow to generate a loadable module to allow this access. type=AVC msg=audit(1532107253.017:429): avc: denied { create } for pid=13454 comm="zabbix_server" name="zabbix_server_preprocessing.sock" scontext=system_u:system_r:zabbix_t:s0 tcontext=s Was caused by: You can use audit2allow to generate a loadable module to allow this access.
tail /var/log/audit/audit.log | audit2allow -M zabbix
semodule -i zabbix.pp [root@zabbix ~]# semodule -i zabbix.pp |
Comment by Aigars Kadikis [ 2018 Jul 30 ] |
Hello, Cyril! Is this issue still relevant? You may try: yum -y install policycoreutils-python cd curl https://support.zabbix.com/secure/attachment/53320/zabbix_server_add.te > zabbix_server_add.te checkmodule -M -m -o zabbix_server_add.mod zabbix_server_add.te semodule_package -m zabbix_server_add.mod -o zabbix_server_add.pp semodule -i zabbix_server_add.pp If the SELinux still blocks the functionality please search carefully what is the cause: grep denied /var/log/audit/audit.log Also it is very important what policy name you choose. After you found your "denied" element please pick the names similar to: grep "denied.*mysqladmin.*zabbix_agent_t" /var/log/audit/audit.log | audit2allow -M mysqladmin_zabbix_agent_t grep "denied.*mysql.*zabbix_agent_t" /var/log/audit/audit.log | audit2allow -M mysql_zabbix_agent_t grep "denied.*zabbix_server.*zabbix_script_t" /var/log/audit/audit.log | audit2allow -M zabbix_server_zabbix_script_t grep "denied.*zabbix_agentd.*zabbix_agent_t" /var/log/audit/audit.log | audit2allow -M zabbix_agentd_zabbix_agent_t Regards, |
Comment by Aigars Kadikis [ 2018 Jul 30 ] |
It feels like with 7.5 I need to add: grep "comm.*zabbix_server.*zabbix_t" /var/log/audit/audit.log | audit2allow -M comm_zabbix_server_zabbix_t semodule -i comm_zabbix_server_zabbix_t.pp and Regards, |
Comment by Cyril Lopez [ 2018 Aug 08 ] |
Hello Aigars Your last comment works.
[root@zabbix ~]# cat comm_zabbix_server_zabbix_t.te module comm_zabbix_server_zabbix_t 1.0; require { #============= zabbix_t ============== #!!!! The file '/run/zabbix/zabbix_server_preprocessing.sock' is mislabeled on your system.
[root@zabbix ~]# ls -lZ /run/zabbix/zabbix_server_preprocessing.sock
Thanks |