janus.te 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. policy_module(janus, 0.0.5)
  2. ########################################
  3. #
  4. # Declarations
  5. #
  6. type janus_t;
  7. type janus_exec_t;
  8. init_daemon_domain(janus_t, janus_exec_t)
  9. type janus_var_log_t;
  10. logging_log_file(janus_var_log_t)
  11. type janus_local_etc_t;
  12. files_config_file(janus_local_etc_t)
  13. type janus_local_share_t;
  14. files_type(janus_local_share_t)
  15. allow janus_t self:fifo_file { read write };
  16. allow janus_t self:netlink_route_socket { bind create getattr nlmsg_read read write };
  17. allow janus_t self:process { getsched setsched };
  18. allow janus_t self:rawip_socket create;
  19. allow janus_t self:tcp_socket { accept bind create getattr listen read setopt shutdown write };
  20. allow janus_t self:udp_socket { bind connect create getattr ioctl read setopt write };
  21. allow janus_t self:unix_dgram_socket { create ioctl };
  22. manage_dirs_pattern(janus_t, janus_var_log_t, janus_var_log_t)
  23. manage_files_pattern(janus_t, janus_var_log_t, janus_var_log_t)
  24. logging_log_filetrans(janus_t, janus_var_log_t, file)
  25. read_files_pattern(janus_t, janus_local_etc_t, janus_local_etc_t)
  26. search_dirs_pattern(janus_t, janus_local_etc_t, janus_local_etc_t)
  27. read_files_pattern(janus_t, janus_local_share_t, janus_local_share_t)
  28. allow janus_t janus_local_share_t:dir read;
  29. search_dirs_pattern(janus_t, janus_local_share_t, janus_local_share_t)
  30. auth_use_nsswitch(janus_t)
  31. miscfiles_read_localization(janus_t)
  32. miscfiles_read_all_certs(janus_t)
  33. sysnet_read_config(janus_t)
  34. corenet_tcp_bind_generic_node(janus_t)
  35. corenet_udp_bind_generic_node(janus_t)
  36. corenet_tcp_bind_all_unreserved_ports(janus_t)
  37. corenet_udp_bind_all_unreserved_ports(janus_t)
  38. kernel_read_network_state(janus_t)
  39. kernel_read_vm_overcommit_sysctl(janus_t)
  40. kernel_read_system_state(janus_t)
  41. dev_read_urand(janus_t)
  42. optional_policy(`
  43. gen_require(`
  44. type supervisor_t;
  45. ')
  46. supervisor_service_domain(janus_t,janus_exec_t)
  47. ')