turnserver.te 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. policy_module(turnserver, 0.1.8)
  2. ########################################
  3. #
  4. # Declarations
  5. #
  6. attribute_role turnserver_roles;
  7. type turnserver_t;
  8. type turnserver_exec_t;
  9. init_daemon_domain(turnserver_t, turnserver_exec_t)
  10. type turnserver_etc_t;
  11. files_config_file(turnserver_etc_t)
  12. type turnserver_initrc_exec_t;
  13. init_script_file(turnserver_initrc_exec_t)
  14. type turnserver_var_run_t;
  15. files_pid_file(turnserver_var_run_t)
  16. type turnserver_var_log_t;
  17. logging_log_file(turnserver_var_log_t)
  18. type turnserver_tmp_t;
  19. files_tmp_file(turnserver_tmp_t)
  20. ########################################
  21. #
  22. # Local policy
  23. #
  24. allow turnserver_t self:tcp_socket { bind create setopt listen };
  25. allow turnserver_t self:udp_socket { getopt create setopt bind };
  26. allow turnserver_t self:capability { setuid setgid dac_override };
  27. allow turnserver_t self:process signal;
  28. allow turnserver_t self:tcp_socket accept;
  29. read_files_pattern(turnserver_t, turnserver_etc_t, turnserver_etc_t)
  30. manage_files_pattern(turnserver_t, turnserver_var_run_t, turnserver_var_run_t)
  31. files_pid_filetrans(turnserver_t, turnserver_var_run_t, file)
  32. manage_files_pattern(turnserver_t, turnserver_var_log_t, turnserver_var_log_t)
  33. logging_log_filetrans(turnserver_t, turnserver_var_log_t, file)
  34. manage_dirs_pattern(turnserver_t,turnserver_tmp_t,turnserver_tmp_t)
  35. manage_files_pattern(turnserver_t,turnserver_tmp_t,turnserver_tmp_t)
  36. files_tmp_filetrans(turnserver_t,turnserver_tmp_t, file)
  37. dev_read_sysfs(turnserver_t)
  38. corenet_tcp_bind_all_unreserved_ports(turnserver_t)
  39. corenet_udp_bind_all_unreserved_ports(turnserver_t)
  40. corenet_tcp_bind_generic_node(turnserver_t)
  41. corenet_udp_bind_generic_node(turnserver_t)
  42. miscfiles_read_localization(turnserver_t)
  43. dev_read_urand(turnserver_t)
  44. auth_use_nsswitch(turnserver_t)