1# IKE key management daemon 2type racoon, domain; 3type racoon_exec, system_file_type, exec_type, file_type; 4 5typeattribute racoon mlstrustedsubject; 6 7net_domain(racoon) 8allowxperm racoon self:udp_socket ioctl { SIOCSIFFLAGS SIOCSIFADDR SIOCSIFNETMASK }; 9 10binder_use(racoon) 11 12allow racoon tun_device:chr_file r_file_perms; 13allowxperm racoon tun_device:chr_file ioctl TUNSETIFF; 14allow racoon cgroup:dir { add_name create }; 15allow racoon cgroup_v2:dir { add_name create }; 16allow racoon kernel:system module_request; 17 18allow racoon self:key_socket create_socket_perms_no_ioctl; 19allow racoon self:tun_socket create_socket_perms_no_ioctl; 20allow racoon self:global_capability_class_set { net_admin net_bind_service net_raw }; 21 22# XXX: should we give ip-up-vpn its own label (currently racoon domain) 23allow racoon system_file:file rx_file_perms; 24not_full_treble(`allow racoon vendor_file:file rx_file_perms;') 25allow racoon vpn_data_file:file create_file_perms; 26allow racoon vpn_data_file:dir w_dir_perms; 27 28use_keystore(racoon) 29 30# Racoon (VPN) has a restricted set of permissions from the default. 31allow racoon keystore:keystore_key { 32 get 33 sign 34 verify 35}; 36