selinux-policy/policy/modules/services/clockspeed.te
Chris PeBenito 1900668638 trunk: Unified labeled networking policy from Paul Moore.
The latest revision of the labeled policy patches which enable both labeled 
and unlabeled policy support for NetLabel.  This revision takes into account
Chris' feedback from the first version and reduces the number of interface
calls in each domain down to two at present: one for unlabeled access, one for
NetLabel access.  The older, transport layer specific interfaces, are still  
present for use by third-party modules but are not used in the default policy
modules.

trunk: Use netmsg initial SID for MLS-only Netlabel packets, from Paul Moore.

This patch changes the policy to use the netmsg initial SID as the "base"
SID/context for NetLabel packets which only have MLS security attributes.
Currently we use the unlabeled initial SID which makes it very difficult to
distinquish between actual unlabeled packets and those packets which have MLS
security attributes.
2007-06-27 15:23:21 +00:00

79 lines
2.3 KiB
Plaintext

policy_module(clockspeed,1.1.1)
########################################
#
# Declarations
#
type clockspeed_cli_t;
type clockspeed_cli_exec_t;
domain_type(clockspeed_cli_t)
domain_entry_file(clockspeed_cli_t,clockspeed_cli_exec_t)
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;
read_files_pattern(clockspeed_cli_t,clockspeed_var_lib_t,clockspeed_var_lib_t)
corenet_all_recvfrom_unlabeled(clockspeed_cli_t)
corenet_all_recvfrom_netlabel(clockspeed_cli_t)
corenet_udp_sendrecv_generic_if(clockspeed_cli_t)
corenet_udp_sendrecv_generic_node(clockspeed_cli_t)
corenet_udp_sendrecv_ntp_port(clockspeed_cli_t)
corenet_sendrecv_ntp_client_packets(clockspeed_cli_t)
files_list_var_lib(clockspeed_cli_t)
files_read_etc_files(clockspeed_cli_t)
libs_use_ld_so(clockspeed_cli_t)
libs_use_shared_libs(clockspeed_cli_t)
miscfiles_read_localization(clockspeed_cli_t)
########################################
#
# 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;
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)
corenet_all_recvfrom_unlabeled(clockspeed_srv_t)
corenet_all_recvfrom_netlabel(clockspeed_srv_t)
corenet_udp_sendrecv_generic_if(clockspeed_srv_t)
corenet_udp_sendrecv_generic_node(clockspeed_srv_t)
corenet_udp_sendrecv_ntp_port(clockspeed_srv_t)
corenet_udp_bind_all_nodes(clockspeed_srv_t)
corenet_udp_bind_clockspeed_port(clockspeed_srv_t)
corenet_sendrecv_clockspeed_server_packets(clockspeed_srv_t)
files_read_etc_files(clockspeed_srv_t)
files_list_var_lib(clockspeed_srv_t)
libs_use_ld_so(clockspeed_srv_t)
libs_use_shared_libs(clockspeed_srv_t)
miscfiles_read_localization(clockspeed_srv_t)
optional_policy(`
daemontools_service_domain(clockspeed_srv_t,clockspeed_srv_exec_t)
')