starbound.te 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. policy_module(starbound, 0.1.9)
  2. ########################################
  3. #
  4. # Declarations
  5. #
  6. attribute_role starbound_roles;
  7. type starbound_t;
  8. type starbound_exec_t;
  9. init_daemon_domain(starbound_t, starbound_exec_t)
  10. type starbound_opt_t;
  11. files_type(starbound_opt_t)
  12. type starbound_tmp_t;
  13. files_tmp_file(starbound_tmp_t)
  14. ########################################
  15. #
  16. # Local policy
  17. #
  18. allow starbound_t self:tcp_socket { bind setopt accept listen create write read shutdown };
  19. allow starbound_t self:netlink_route_socket { write getattr read bind create nlmsg_read };
  20. allow starbound_t self:process signal;
  21. corenet_tcp_bind_generic_node(starbound_t)
  22. corenet_tcp_bind_all_unreserved_ports(starbound_t)
  23. kernel_read_vm_sysctls(starbound_t)
  24. dev_read_urand(starbound_t)
  25. dev_read_sysfs(starbound_t)
  26. kernel_read_system_state(starbound_t)
  27. manage_dirs_pattern(starbound_t, starbound_opt_t, starbound_opt_t)
  28. manage_files_pattern(starbound_t, starbound_opt_t, starbound_opt_t)
  29. type_transition starbound_t starbound_opt_t:file starbound_opt_t;
  30. type_transition starbound_t starbound_opt_t:dir starbound_opt_t;
  31. manage_dirs_pattern(starbound_t,starbound_tmp_t,starbound_tmp_t)
  32. manage_files_pattern(starbound_t,starbound_tmp_t,starbound_tmp_t)
  33. files_tmp_filetrans(starbound_t,starbound_tmp_t, file)
  34. optional_policy(`
  35. gen_require(`
  36. type supervisor_t;
  37. ')
  38. supervisor_service_domain(starbound_t,starbound_exec_t)
  39. allow supervisor_t starbound_opt_t:dir search;
  40. ')
  41. miscfiles_read_localization(starbound_t)