|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
141cff |
policy_module(clockspeed,1.0.1)
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
########################################
|
|
Chris PeBenito |
46bec4 |
#
|
|
Chris PeBenito |
46bec4 |
# Declarations
|
|
Chris PeBenito |
46bec4 |
#
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
type clockspeed_cli_t;
|
|
Chris PeBenito |
46bec4 |
type clockspeed_cli_exec_t;
|
|
Chris PeBenito |
46bec4 |
domain_type(clockspeed_cli_t)
|
|
Chris PeBenito |
46bec4 |
domain_entry_file(clockspeed_cli_t,clockspeed_cli_exec_t)
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
type clockspeed_srv_t;
|
|
Chris PeBenito |
46bec4 |
type clockspeed_srv_exec_t;
|
|
Chris PeBenito |
46bec4 |
init_daemon_domain(clockspeed_srv_t, clockspeed_srv_exec_t)
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
type clockspeed_var_lib_t;
|
|
Chris PeBenito |
46bec4 |
files_type(clockspeed_var_lib_t)
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
########################################
|
|
Chris PeBenito |
46bec4 |
#
|
|
Chris PeBenito |
46bec4 |
# Client local policy
|
|
Chris PeBenito |
46bec4 |
#
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
allow clockspeed_cli_t self:capability sys_time;
|
|
Chris PeBenito |
46bec4 |
allow clockspeed_cli_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
46bec4 |
allow clockspeed_cli_t clockspeed_var_lib_t:dir search;
|
|
Chris PeBenito |
46bec4 |
allow clockspeed_cli_t clockspeed_var_lib_t:file { getattr read };
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
corenet_non_ipsec_sendrecv(clockspeed_cli_t)
|
|
Chris PeBenito |
46bec4 |
corenet_udp_sendrecv_generic_if(clockspeed_cli_t)
|
|
Chris PeBenito |
46bec4 |
corenet_udp_sendrecv_generic_node(clockspeed_cli_t)
|
|
Chris PeBenito |
46bec4 |
corenet_udp_sendrecv_ntp_port(clockspeed_cli_t)
|
|
Chris PeBenito |
141cff |
corenet_sendrecv_ntp_client_packets(clockspeed_cli_t)
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
files_list_var_lib(clockspeed_cli_t)
|
|
Chris PeBenito |
46bec4 |
files_read_etc_files(clockspeed_cli_t)
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
libs_use_ld_so(clockspeed_cli_t)
|
|
Chris PeBenito |
46bec4 |
libs_use_shared_libs(clockspeed_cli_t)
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
miscfiles_read_localization(clockspeed_cli_t)
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
########################################
|
|
Chris PeBenito |
46bec4 |
#
|
|
Chris PeBenito |
46bec4 |
# Server local policy
|
|
Chris PeBenito |
46bec4 |
#
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
allow clockspeed_srv_t self:capability { sys_time net_bind_service };
|
|
Chris PeBenito |
46bec4 |
allow clockspeed_srv_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
46bec4 |
allow clockspeed_srv_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
46bec4 |
allow clockspeed_srv_t self:unix_stream_socket create_socket_perms;
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
allow clockspeed_srv_t clockspeed_var_lib_t:dir rw_dir_perms;
|
|
Chris PeBenito |
46bec4 |
allow clockspeed_srv_t clockspeed_var_lib_t:file create_file_perms;
|
|
Chris PeBenito |
46bec4 |
allow clockspeed_srv_t clockspeed_var_lib_t:fifo_file create_file_perms;
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
corenet_non_ipsec_sendrecv(clockspeed_srv_t)
|
|
Chris PeBenito |
46bec4 |
corenet_udp_sendrecv_generic_if(clockspeed_srv_t)
|
|
Chris PeBenito |
46bec4 |
corenet_udp_sendrecv_generic_node(clockspeed_srv_t)
|
|
Chris PeBenito |
46bec4 |
corenet_udp_sendrecv_ntp_port(clockspeed_srv_t)
|
|
Chris PeBenito |
141cff |
corenet_udp_bind_all_nodes(clockspeed_srv_t)
|
|
Chris PeBenito |
46bec4 |
corenet_udp_bind_clockspeed_port(clockspeed_srv_t)
|
|
Chris PeBenito |
141cff |
corenet_sendrecv_clockspeed_server_packets(clockspeed_srv_t)
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
files_read_etc_files(clockspeed_srv_t)
|
|
Chris PeBenito |
46bec4 |
files_list_var_lib(clockspeed_srv_t)
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
libs_use_ld_so(clockspeed_srv_t)
|
|
Chris PeBenito |
46bec4 |
libs_use_shared_libs(clockspeed_srv_t)
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
miscfiles_read_localization(clockspeed_srv_t)
|
|
Chris PeBenito |
46bec4 |
|
|
Chris PeBenito |
46bec4 |
optional_policy(`
|
|
Chris PeBenito |
46bec4 |
daemontools_service_domain(clockspeed_srv_t,clockspeed_srv_exec_t)
|
|
Chris PeBenito |
46bec4 |
')
|