|
Dan Walsh |
3eaa99 |
policy_module(zarafa, 1.0.0)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# Declarations
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
attribute zarafa_domain;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
zarafa_domain_template(monitor)
|
|
Dan Walsh |
3eaa99 |
zarafa_domain_template(ical)
|
|
Dan Walsh |
3eaa99 |
zarafa_domain_template(server)
|
|
Dan Walsh |
3eaa99 |
zarafa_domain_template(spooler)
|
|
Dan Walsh |
3eaa99 |
zarafa_domain_template(gateway)
|
|
Dan Walsh |
3eaa99 |
zarafa_domain_template(deliver)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
type zarafa_deliver_tmp_t;
|
|
Dan Walsh |
3eaa99 |
files_tmp_file(zarafa_deliver_tmp_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
type zarafa_etc_t;
|
|
Dan Walsh |
3eaa99 |
files_config_file(zarafa_etc_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
type zarafa_share_t;
|
|
Dan Walsh |
3eaa99 |
files_type(zarafa_share_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
permissive zarafa_server_t;
|
|
Dan Walsh |
3eaa99 |
permissive zarafa_spooler_t;
|
|
Dan Walsh |
3eaa99 |
permissive zarafa_gateway_t;
|
|
Dan Walsh |
3eaa99 |
permissive zarafa_deliver_t;
|
|
Dan Walsh |
3eaa99 |
permissive zarafa_ical_t;
|
|
Dan Walsh |
3eaa99 |
permissive zarafa_monitor_t;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# zarafa-deliver local policy
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
manage_dirs_pattern(zarafa_deliver_t, zarafa_deliver_tmp_t, zarafa_deliver_tmp_t)
|
|
Dan Walsh |
3eaa99 |
manage_files_pattern(zarafa_deliver_t, zarafa_deliver_tmp_t, zarafa_deliver_tmp_t)
|
|
Dan Walsh |
3eaa99 |
files_tmp_filetrans(zarafa_deliver_t, zarafa_deliver_tmp_t, { file dir })
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
#temporary
|
|
Dan Walsh |
3eaa99 |
#allow zarafa_deliver_t port_t:tcp_socket name_bind;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# zarafa_server local policy
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dominick Grift |
aaf8a6 |
allow zarafa_server_t self:capability { chown kill net_bind_service };
|
|
Dan Walsh |
3eaa99 |
allow zarafa_server_t self:process { setrlimit signal };
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_bind_zarafa_port(zarafa_server_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
files_read_usr_files(zarafa_server_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
logging_send_syslog_msg(zarafa_server_t)
|
|
Dan Walsh |
3eaa99 |
logging_send_audit_msgs(zarafa_server_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
sysnet_dns_name_resolve(zarafa_server_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
mysql_stream_connect(zarafa_server_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
kerberos_use(zarafa_server_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# zarafa_spooler local policy
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
allow zarafa_spooler_t self:capability { chown kill };
|
|
Dominick Grift |
a25335 |
allow zarafa_spooler_t self:process signal;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_connect_smtp_port(zarafa_spooler_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# zarafa_gateway local policy
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
allow zarafa_gateway_t self:capability { chown kill };
|
|
Dan Walsh |
3eaa99 |
allow zarafa_gateway_t self:process { setrlimit signal };
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_bind_pop_port(zarafa_gateway_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
#######################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# zarafa-ical local policy
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
allow zarafa_ical_t self:capability chown;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_bind_http_cache_port(zarafa_ical_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
######################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# zarafa-monitor local policy
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
allow zarafa_monitor_t self:capability chown;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# zarafa domains local policy
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
# bad permission on /etc/zarafa
|
|
Dan Walsh |
3eaa99 |
allow zarafa_domain self:capability { dac_override setgid setuid };
|
|
Dan Walsh |
3eaa99 |
allow zarafa_domain self:fifo_file rw_fifo_file_perms;
|
|
Dan Walsh |
3eaa99 |
allow zarafa_domain self:tcp_socket create_stream_socket_perms;
|
|
Dan Walsh |
3eaa99 |
allow zarafa_domain self:unix_stream_socket create_stream_socket_perms;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
stream_connect_pattern(zarafa_domain, zarafa_server_var_run_t, zarafa_server_var_run_t, zarafa_server_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
read_files_pattern(zarafa_domain, zarafa_etc_t, zarafa_etc_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
kernel_read_system_state(zarafa_domain)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
files_read_etc_files(zarafa_domain)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
auth_use_nsswitch(zarafa_domain)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
miscfiles_read_localization(zarafa_domain)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
# temporary rules
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
apache_content_template(zarafa)
|
|
Dan Walsh |
3eaa99 |
')
|