diff options
author | Chris PeBenito <pebenito@ieee.org> | 2018-06-23 10:38:58 -0400 |
---|---|---|
committer | Jason Zaman <jason@perfinion.com> | 2018-06-24 16:33:24 +0800 |
commit | 751926c0fbba4bf7105622ee65888b66740847a0 (patch) | |
tree | 6bbdd39cd5becdddc8e4cbc41332c383874c7972 /policy/modules/services/l2tp.te | |
parent | xdg: move compat interfaces to upstream xdg module (diff) | |
download | hardened-refpolicy-751926c0fbba4bf7105622ee65888b66740847a0.tar.gz hardened-refpolicy-751926c0fbba4bf7105622ee65888b66740847a0.tar.bz2 hardened-refpolicy-751926c0fbba4bf7105622ee65888b66740847a0.zip |
Move all files out of the old contrib directory.
Diffstat (limited to 'policy/modules/services/l2tp.te')
-rw-r--r-- | policy/modules/services/l2tp.te | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/policy/modules/services/l2tp.te b/policy/modules/services/l2tp.te new file mode 100644 index 000000000..2fd536984 --- /dev/null +++ b/policy/modules/services/l2tp.te @@ -0,0 +1,94 @@ +policy_module(l2tp, 1.4.0) + +######################################## +# +# Declarations +# + +type l2tpd_t; +type l2tpd_exec_t; +init_daemon_domain(l2tpd_t, l2tpd_exec_t) + +type l2tpd_initrc_exec_t; +init_script_file(l2tpd_initrc_exec_t) + +type l2tp_conf_t; +files_config_file(l2tp_conf_t) + +type l2tpd_tmp_t; +files_tmp_file(l2tpd_tmp_t) + +type l2tpd_var_run_t; +files_pid_file(l2tpd_var_run_t) + +######################################## +# +# Local policy +# + +allow l2tpd_t self:capability net_admin; +allow l2tpd_t self:process signal; +allow l2tpd_t self:fifo_file rw_fifo_file_perms; +allow l2tpd_t self:netlink_socket create_socket_perms; +allow l2tpd_t self:rawip_socket create_socket_perms; +allow l2tpd_t self:socket create_socket_perms; +allow l2tpd_t self:tcp_socket { accept listen }; +allow l2tpd_t self:unix_dgram_socket sendto; +allow l2tpd_t self:unix_stream_socket { accept listen }; + +read_files_pattern(l2tpd_t, l2tp_conf_t, l2tp_conf_t) + +manage_dirs_pattern(l2tpd_t, l2tpd_var_run_t, l2tpd_var_run_t) +manage_files_pattern(l2tpd_t, l2tpd_var_run_t, l2tpd_var_run_t) +manage_sock_files_pattern(l2tpd_t, l2tpd_var_run_t, l2tpd_var_run_t) +manage_fifo_files_pattern(l2tpd_t, l2tpd_var_run_t, l2tpd_var_run_t) +files_pid_filetrans(l2tpd_t, l2tpd_var_run_t, { dir file sock_file }) + +manage_sock_files_pattern(l2tpd_t, l2tpd_tmp_t, l2tpd_tmp_t) +files_tmp_filetrans(l2tpd_t, l2tpd_tmp_t, sock_file) + +corenet_all_recvfrom_unlabeled(l2tpd_t) +corenet_all_recvfrom_netlabel(l2tpd_t) +corenet_raw_sendrecv_generic_if(l2tpd_t) +corenet_tcp_sendrecv_generic_if(l2tpd_t) +corenet_udp_sendrecv_generic_if(l2tpd_t) +corenet_raw_bind_generic_node(l2tpd_t) +corenet_tcp_bind_generic_node(l2tpd_t) +corenet_udp_bind_generic_node(l2tpd_t) +corenet_raw_sendrecv_generic_node(l2tpd_t) +corenet_tcp_sendrecv_generic_node(l2tpd_t) +corenet_udp_sendrecv_generic_node(l2tpd_t) +corenet_tcp_sendrecv_all_ports(l2tpd_t) +corenet_udp_sendrecv_all_ports(l2tpd_t) + +corenet_sendrecv_all_server_packets(l2tpd_t) +corenet_tcp_bind_all_rpc_ports(l2tpd_t) +corenet_udp_bind_all_rpc_ports(l2tpd_t) + +corenet_udp_bind_l2tp_port(l2tpd_t) + +kernel_read_network_state(l2tpd_t) +kernel_read_system_state(l2tpd_t) +kernel_request_load_module(l2tpd_t) + +corecmd_exec_bin(l2tpd_t) + +dev_read_urand(l2tpd_t) + +files_read_etc_files(l2tpd_t) + +term_setattr_generic_ptys(l2tpd_t) +term_use_generic_ptys(l2tpd_t) +term_use_ptmx(l2tpd_t) + +logging_send_syslog_msg(l2tpd_t) + +miscfiles_read_localization(l2tpd_t) + +sysnet_dns_name_resolve(l2tpd_t) + +optional_policy(` + ppp_domtrans(l2tpd_t) + ppp_signal(l2tpd_t) + ppp_kill(l2tpd_t) +') |