selinux-policy/refpolicy/policy/modules/admin/vpn.te
2005-12-09 16:38:39 +00:00

113 lines
2.7 KiB
Plaintext

policy_module(vpnc,1.0.0)
########################################
#
# Declarations
#
type vpnc_t;
domain_type(vpnc_t)
type vpnc_exec_t;
domain_entry_file(vpnc_t,vpnc_exec_t)
type vpnc_tmp_t;
files_tmp_file(vpnc_tmp_t)
type vpnc_var_run_t;
files_pid_file(vpnc_var_run_t)
########################################
#
# Local policy
#
allow vpnc_t self:capability { net_admin ipc_lock net_raw };
allow vpnc_t self:fifo_file { getattr ioctl read write };
allow vpnc_t self:netlink_route_socket rw_netlink_socket_perms;
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;
# cjp: this needs to be fixed
allow vpnc_t self:socket create_socket_perms;
allow vpnc_t vpnc_tmp_t:dir create_dir_perms;
allow vpnc_t vpnc_tmp_t:file create_file_perms;
files_create_tmp_files(vpnc_t, vpnc_tmp_t, { file dir })
allow vpnc_t vpnc_var_run_t:file create_file_perms;
allow vpnc_t vpnc_var_run_t:dir rw_dir_perms;
files_create_pid(vpnc_t,vpnc_var_run_t)
kernel_read_system_state(vpnc_t)
kernel_read_network_state(vpnc_t)
kernel_read_kernel_sysctl(vpnc_t)
kernel_rw_net_sysctl(vpnc_t)
corenet_tcp_sendrecv_all_if(vpnc_t)
corenet_udp_sendrecv_all_if(vpnc_t)
corenet_raw_sendrecv_all_if(vpnc_t)
corenet_tcp_sendrecv_all_nodes(vpnc_t)
corenet_udp_sendrecv_all_nodes(vpnc_t)
corenet_raw_sendrecv_all_nodes(vpnc_t)
corenet_tcp_sendrecv_all_ports(vpnc_t)
corenet_udp_sendrecv_all_ports(vpnc_t)
corenet_non_ipsec_sendrecv(vpnc_t)
corenet_tcp_bind_all_nodes(vpnc_t)
corenet_udp_bind_all_nodes(vpnc_t)
corenet_udp_bind_generic_port(vpnc_t)
corenet_udp_bind_isakmp_port(vpnc_t)
corenet_tcp_connect_all_ports(vpnc_t)
corenet_use_tun_tap_device(vpnc_t)
dev_read_rand(vpnc_t)
dev_read_urand(vpnc_t)
dev_read_sysfs(vpnc_t)
fs_getattr_xattr_fs(vpnc_t)
term_use_all_user_ptys(vpnc_t)
term_use_all_user_ttys(vpnc_t)
corecmd_exec_bin(vpnc_t)
corecmd_exec_sbin(vpnc_t)
corecmd_exec_shell(vpnc_t)
domain_exec_all_entry_files(vpnc_t)
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)
libs_exec_ld_so(vpnc_t)
libs_exec_lib_files(vpnc_t)
libs_use_ld_so(vpnc_t)
libs_use_shared_libs(vpnc_t)
miscfiles_read_localization(vpnc_t)
seutil_dontaudit_search_config(vpnc_t)
sysnet_exec_ifconfig(vpnc_t)
sysnet_create_config(vpnc_t)
sysnet_manage_config(vpnc_t)
userdom_use_all_user_fd(vpnc_t)
userdom_dontaudit_search_all_users_home(vpnc_t)
optional_policy(`mount',`
mount_send_nfs_client_request(vpnc_t)
')
optional_policy(`nis',`
nis_use_ypbind(vpnc_t)
')
optional_policy(`nscd',`
nscd_use_socket(vpnc_t)
')