racoon.te 1.1 KB

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