2020-04-09 13:41:05 +00:00
|
|
|
policy_module(dkim, 1.7.1)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
milter_template(dkim)
|
|
|
|
|
|
|
|
type dkim_milter_initrc_exec_t;
|
|
|
|
init_script_file(dkim_milter_initrc_exec_t)
|
|
|
|
|
|
|
|
type dkim_milter_private_key_t;
|
|
|
|
files_security_file(dkim_milter_private_key_t)
|
|
|
|
|
|
|
|
type dkim_milter_unit_t;
|
|
|
|
init_unit_file(dkim_milter_unit_t)
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
init_daemon_runtime_file(dkim_milter_data_t, dir, "opendkim")
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow dkim_milter_t self:capability { dac_read_search dac_override setgid setuid };
|
|
|
|
allow dkim_milter_t self:process { signal signull };
|
|
|
|
allow dkim_milter_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
|
|
|
|
read_files_pattern(dkim_milter_t, dkim_milter_private_key_t, dkim_milter_private_key_t)
|
|
|
|
|
|
|
|
# /proc/sys/kernel/ngroups_max
|
|
|
|
kernel_read_kernel_sysctls(dkim_milter_t)
|
|
|
|
kernel_read_vm_overcommit_sysctl(dkim_milter_t)
|
|
|
|
|
|
|
|
corenet_udp_bind_generic_node(dkim_milter_t)
|
|
|
|
corenet_udp_bind_all_unreserved_ports(dkim_milter_t)
|
|
|
|
|
|
|
|
dev_read_urand(dkim_milter_t)
|
|
|
|
# for cpu/online
|
|
|
|
dev_read_sysfs(dkim_milter_t)
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_filetrans(dkim_milter_t, dkim_milter_data_t, { dir file })
|
2018-06-23 13:00:56 +00:00
|
|
|
files_read_usr_files(dkim_milter_t)
|
|
|
|
files_search_spool(dkim_milter_t)
|
|
|
|
|
2020-04-05 09:04:28 +00:00
|
|
|
miscfiles_read_generic_certs(dkim_milter_t)
|
|
|
|
|
2018-06-23 13:00:56 +00:00
|
|
|
optional_policy(`
|
|
|
|
mta_read_config(dkim_milter_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
# set up unix socket
|
|
|
|
postfix_search_spool(dkim_milter_t)
|
|
|
|
')
|