fee48647ac
67effb0
483be01
c6c63f6
b0d8d59
5b082e4
b8097d6
689d954
5afc3d3
f3c5e77
a59e50c
cf87233
17759c7
dc1db54
e9bf16d
4f95198
bf40792
622c63b
c20842c
dc7cc4d
792d448
53 lines
1.1 KiB
Plaintext
53 lines
1.1 KiB
Plaintext
policy_module(zabbix, 1.2.1)
|
|
|
|
########################################
|
|
#
|
|
# Declarations
|
|
#
|
|
|
|
type zabbix_t;
|
|
type zabbix_exec_t;
|
|
init_daemon_domain(zabbix_t, zabbix_exec_t)
|
|
|
|
type zabbix_initrc_exec_t;
|
|
init_script_file(zabbix_initrc_exec_t)
|
|
|
|
# log files
|
|
type zabbix_log_t;
|
|
logging_log_file(zabbix_log_t)
|
|
|
|
# pid files
|
|
type zabbix_var_run_t;
|
|
files_pid_file(zabbix_var_run_t)
|
|
|
|
########################################
|
|
#
|
|
# zabbix local policy
|
|
#
|
|
|
|
allow zabbix_t self:capability { setuid setgid };
|
|
allow zabbix_t self:fifo_file rw_file_perms;
|
|
allow zabbix_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
# log files
|
|
allow zabbix_t zabbix_log_t:dir setattr;
|
|
manage_files_pattern(zabbix_t, zabbix_log_t, zabbix_log_t)
|
|
logging_log_filetrans(zabbix_t, zabbix_log_t, file)
|
|
|
|
# pid file
|
|
manage_dirs_pattern(zabbix_t, zabbix_var_run_t, zabbix_var_run_t)
|
|
manage_files_pattern(zabbix_t, zabbix_var_run_t, zabbix_var_run_t)
|
|
files_pid_filetrans(zabbix_t, zabbix_var_run_t, { dir file })
|
|
|
|
files_read_etc_files(zabbix_t)
|
|
|
|
miscfiles_read_localization(zabbix_t)
|
|
|
|
optional_policy(`
|
|
mysql_stream_connect(zabbix_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
postgresql_stream_connect(zabbix_t)
|
|
')
|