2009-08-05 14:59:21 +00:00
|
|
|
policy_module(clockspeed, 1.5.0)
|
2006-05-08 14:16:10 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type clockspeed_cli_t;
|
|
|
|
type clockspeed_cli_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
application_domain(clockspeed_cli_t, clockspeed_cli_exec_t)
|
2006-05-08 14:16:10 +00:00
|
|
|
|
|
|
|
type clockspeed_srv_t;
|
|
|
|
type clockspeed_srv_exec_t;
|
|
|
|
init_daemon_domain(clockspeed_srv_t, clockspeed_srv_exec_t)
|
|
|
|
|
|
|
|
type clockspeed_var_lib_t;
|
|
|
|
files_type(clockspeed_var_lib_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Client local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow clockspeed_cli_t self:capability sys_time;
|
|
|
|
allow clockspeed_cli_t self:udp_socket create_socket_perms;
|
2006-12-12 20:08:08 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern(clockspeed_cli_t, clockspeed_var_lib_t, clockspeed_var_lib_t)
|
2006-05-08 14:16:10 +00:00
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(clockspeed_cli_t)
|
|
|
|
corenet_all_recvfrom_netlabel(clockspeed_cli_t)
|
2006-05-08 14:16:10 +00:00
|
|
|
corenet_udp_sendrecv_generic_if(clockspeed_cli_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(clockspeed_cli_t)
|
|
|
|
corenet_udp_sendrecv_ntp_port(clockspeed_cli_t)
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_sendrecv_ntp_client_packets(clockspeed_cli_t)
|
2006-05-08 14:16:10 +00:00
|
|
|
|
|
|
|
files_list_var_lib(clockspeed_cli_t)
|
|
|
|
files_read_etc_files(clockspeed_cli_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(clockspeed_cli_t)
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_use_user_terminals(clockspeed_cli_t)
|
|
|
|
|
2006-05-08 14:16:10 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Server local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow clockspeed_srv_t self:capability { sys_time net_bind_service };
|
|
|
|
allow clockspeed_srv_t self:udp_socket create_socket_perms;
|
|
|
|
allow clockspeed_srv_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow clockspeed_srv_t self:unix_stream_socket create_socket_perms;
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(clockspeed_srv_t, clockspeed_var_lib_t, clockspeed_var_lib_t)
|
|
|
|
manage_fifo_files_pattern(clockspeed_srv_t, clockspeed_var_lib_t, clockspeed_var_lib_t)
|
2006-05-08 14:16:10 +00:00
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(clockspeed_srv_t)
|
|
|
|
corenet_all_recvfrom_netlabel(clockspeed_srv_t)
|
2006-05-08 14:16:10 +00:00
|
|
|
corenet_udp_sendrecv_generic_if(clockspeed_srv_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(clockspeed_srv_t)
|
|
|
|
corenet_udp_sendrecv_ntp_port(clockspeed_srv_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_udp_bind_generic_node(clockspeed_srv_t)
|
2006-05-08 14:16:10 +00:00
|
|
|
corenet_udp_bind_clockspeed_port(clockspeed_srv_t)
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_sendrecv_clockspeed_server_packets(clockspeed_srv_t)
|
2006-05-08 14:16:10 +00:00
|
|
|
|
|
|
|
files_read_etc_files(clockspeed_srv_t)
|
|
|
|
files_list_var_lib(clockspeed_srv_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(clockspeed_srv_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
2008-07-23 21:38:39 +00:00
|
|
|
daemontools_service_domain(clockspeed_srv_t, clockspeed_srv_exec_t)
|
2006-05-08 14:16:10 +00:00
|
|
|
')
|