2010-12-13 14:12:22 +00:00
|
|
|
policy_module(vpn, 1.14.0)
|
2005-09-19 21:17:45 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type vpnc_t;
|
|
|
|
type vpnc_exec_t;
|
2008-02-18 14:55:25 +00:00
|
|
|
application_domain(vpnc_t, vpnc_exec_t)
|
2006-02-20 16:31:54 +00:00
|
|
|
role system_r types vpnc_t;
|
2005-09-19 21:17:45 +00:00
|
|
|
|
|
|
|
type vpnc_tmp_t;
|
|
|
|
files_tmp_file(vpnc_tmp_t)
|
|
|
|
|
|
|
|
type vpnc_var_run_t;
|
|
|
|
files_pid_file(vpnc_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
2008-10-06 17:27:49 +00:00
|
|
|
allow vpnc_t self:capability { dac_read_search dac_override net_admin ipc_lock net_raw };
|
2008-10-13 15:06:23 +00:00
|
|
|
allow vpnc_t self:process { getsched signal };
|
2008-10-06 17:27:49 +00:00
|
|
|
allow vpnc_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
allow vpnc_t self:netlink_route_socket rw_netlink_socket_perms;
|
2005-09-19 21:17:45 +00:00
|
|
|
allow vpnc_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow vpnc_t self:udp_socket create_socket_perms;
|
|
|
|
allow vpnc_t self:rawip_socket create_socket_perms;
|
|
|
|
allow vpnc_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow vpnc_t self:unix_stream_socket create_socket_perms;
|
2010-06-28 17:06:51 +00:00
|
|
|
allow vpnc_t self:tun_socket { create_socket_perms relabelfrom };
|
2005-09-19 21:17:45 +00:00
|
|
|
# cjp: this needs to be fixed
|
|
|
|
allow vpnc_t self:socket create_socket_perms;
|
|
|
|
|
2008-02-18 14:55:25 +00:00
|
|
|
manage_dirs_pattern(vpnc_t, vpnc_tmp_t, vpnc_tmp_t)
|
|
|
|
manage_files_pattern(vpnc_t, vpnc_tmp_t, vpnc_tmp_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
files_tmp_filetrans(vpnc_t, vpnc_tmp_t, { file dir })
|
2005-09-19 21:17:45 +00:00
|
|
|
|
2008-02-18 14:55:25 +00:00
|
|
|
manage_dirs_pattern(vpnc_t, vpnc_var_run_t, vpnc_var_run_t)
|
|
|
|
manage_files_pattern(vpnc_t, vpnc_var_run_t, vpnc_var_run_t)
|
|
|
|
files_pid_filetrans(vpnc_t, vpnc_var_run_t, { file dir})
|
2005-09-19 21:17:45 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(vpnc_t)
|
|
|
|
kernel_read_network_state(vpnc_t)
|
2008-10-13 15:06:23 +00:00
|
|
|
kernel_read_all_sysctls(vpnc_t)
|
2010-05-24 14:12:43 +00:00
|
|
|
kernel_request_load_module(vpnc_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_rw_net_sysctls(vpnc_t)
|
2005-09-19 21:17:45 +00:00
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(vpnc_t)
|
|
|
|
corenet_all_recvfrom_netlabel(vpnc_t)
|
2009-01-06 20:24:10 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(vpnc_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(vpnc_t)
|
|
|
|
corenet_raw_sendrecv_generic_if(vpnc_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(vpnc_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(vpnc_t)
|
|
|
|
corenet_raw_sendrecv_generic_node(vpnc_t)
|
2005-09-19 21:17:45 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(vpnc_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(vpnc_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_udp_bind_generic_node(vpnc_t)
|
2005-09-19 21:17:45 +00:00
|
|
|
corenet_udp_bind_generic_port(vpnc_t)
|
|
|
|
corenet_udp_bind_isakmp_port(vpnc_t)
|
2008-02-18 14:55:25 +00:00
|
|
|
corenet_udp_bind_ipsecnat_port(vpnc_t)
|
2005-09-19 21:17:45 +00:00
|
|
|
corenet_tcp_connect_all_ports(vpnc_t)
|
2006-05-29 19:53:43 +00:00
|
|
|
corenet_sendrecv_all_client_packets(vpnc_t)
|
|
|
|
corenet_sendrecv_isakmp_server_packets(vpnc_t)
|
|
|
|
corenet_sendrecv_generic_server_packets(vpnc_t)
|
2006-02-16 21:33:18 +00:00
|
|
|
corenet_rw_tun_tap_dev(vpnc_t)
|
2005-09-19 21:17:45 +00:00
|
|
|
|
|
|
|
dev_read_rand(vpnc_t)
|
|
|
|
dev_read_urand(vpnc_t)
|
|
|
|
dev_read_sysfs(vpnc_t)
|
|
|
|
|
2008-02-18 14:55:25 +00:00
|
|
|
domain_use_interactive_fds(vpnc_t)
|
|
|
|
|
2005-09-19 21:17:45 +00:00
|
|
|
fs_getattr_xattr_fs(vpnc_t)
|
2006-02-20 16:31:54 +00:00
|
|
|
fs_getattr_tmpfs(vpnc_t)
|
2005-09-19 21:17:45 +00:00
|
|
|
|
2010-02-11 19:20:10 +00:00
|
|
|
term_use_all_ptys(vpnc_t)
|
|
|
|
term_use_all_ttys(vpnc_t)
|
2005-09-19 21:17:45 +00:00
|
|
|
|
2006-04-19 21:43:02 +00:00
|
|
|
corecmd_exec_all_executables(vpnc_t)
|
2005-09-19 21:17:45 +00:00
|
|
|
|
|
|
|
files_exec_etc_files(vpnc_t)
|
|
|
|
files_read_etc_runtime_files(vpnc_t)
|
|
|
|
files_read_etc_files(vpnc_t)
|
|
|
|
files_dontaudit_search_home(vpnc_t)
|
|
|
|
|
2007-12-06 16:04:14 +00:00
|
|
|
auth_use_nsswitch(vpnc_t)
|
|
|
|
|
2005-09-19 21:17:45 +00:00
|
|
|
libs_exec_ld_so(vpnc_t)
|
|
|
|
libs_exec_lib_files(vpnc_t)
|
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
locallogin_use_fds(vpnc_t)
|
2006-02-27 16:23:39 +00:00
|
|
|
|
2006-01-11 15:28:14 +00:00
|
|
|
logging_send_syslog_msg(vpnc_t)
|
2008-02-18 14:55:25 +00:00
|
|
|
logging_dontaudit_search_logs(vpnc_t)
|
2006-01-11 15:28:14 +00:00
|
|
|
|
2005-09-19 21:17:45 +00:00
|
|
|
miscfiles_read_localization(vpnc_t)
|
|
|
|
|
|
|
|
seutil_dontaudit_search_config(vpnc_t)
|
2007-02-16 23:01:42 +00:00
|
|
|
seutil_use_newrole_fds(vpnc_t)
|
2005-09-19 21:17:45 +00:00
|
|
|
|
2006-02-21 18:40:44 +00:00
|
|
|
sysnet_etc_filetrans_config(vpnc_t)
|
2005-09-19 21:17:45 +00:00
|
|
|
sysnet_manage_config(vpnc_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_use_all_users_fds(vpnc_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_dontaudit_search_user_home_content(vpnc_t)
|
2005-09-19 21:17:45 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2008-11-05 16:10:46 +00:00
|
|
|
dbus_system_bus_client(vpnc_t)
|
2007-10-26 18:04:38 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-02-27 16:23:39 +00:00
|
|
|
networkmanager_dbus_chat(vpnc_t)
|
|
|
|
')
|
2006-01-11 15:28:14 +00:00
|
|
|
')
|
2010-05-24 14:12:43 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
networkmanager_attach_tun_iface(vpnc_t)
|
|
|
|
')
|