terraria.te 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. policy_module(terraria, 0.1.4)
  2. ########################################
  3. #
  4. # Declarations
  5. #
  6. attribute_role terraria_roles;
  7. type terraria_t;
  8. type terraria_exec_t;
  9. init_daemon_domain(terraria_t,terraria_exec_t)
  10. type terraria_opt_t;
  11. files_type(terraria_opt_t)
  12. type terraria_tmp_t;
  13. files_tmp_file(terraria_tmp_t)
  14. ########################################
  15. #
  16. # Local policy
  17. #
  18. allow terraria_t self:process { execmem signal signull getsched };
  19. allow terraria_t self:tcp_socket { bind create setopt shutdown accept listen };
  20. auth_use_nsswitch(terraria_t)
  21. miscfiles_read_localization(terraria_t)
  22. corenet_tcp_bind_all_unreserved_ports(terraria_t)
  23. corenet_tcp_bind_generic_node(terraria_t)
  24. kernel_read_system_state(terraria_t)
  25. fs_manage_tmpfs_files(terraria_t)
  26. kernel_read_vm_sysctls(terraria_t)
  27. fs_getattr_tmpfs(terraria_t)
  28. dev_read_sysfs(terraria_t)
  29. manage_dirs_pattern(terraria_t,terraria_opt_t,terraria_opt_t)
  30. manage_files_pattern(terraria_t,terraria_opt_t,terraria_opt_t)
  31. allow terraria_t terraria_opt_t:file execute;
  32. type_transition terraria_t terraria_opt_t:file terraria_opt_t;
  33. type_transition terraria_t terraria_opt_t:dir terraria_opt_t;
  34. manage_dirs_pattern(terraria_t,terraria_tmp_t,terraria_tmp_t)
  35. manage_files_pattern(terraria_t,terraria_tmp_t,terraria_tmp_t)
  36. files_tmp_filetrans(terraria_t,terraria_tmp_t, file)
  37. optional_policy(`
  38. gen_require(`
  39. type supervisor_t;
  40. ')
  41. supervisor_service_domain(terraria_t,terraria_exec_t)
  42. allow supervisor_t terraria_opt_t:dir search;
  43. allow supervisor_t terraria_t:process { siginh rlimitinh noatsecure };
  44. ')