xonotic.te 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. policy_module(xonotic, 0.1.6)
  2. ########################################
  3. #
  4. # Declarations
  5. #
  6. attribute_role xonotic_roles;
  7. type xonotic_t;
  8. type xonotic_exec_t;
  9. init_daemon_domain(xonotic_t, xonotic_exec_t)
  10. role xonotic_roles types xonotic_t;
  11. type xonotic_initrc_exec_t;
  12. init_script_file(xonotic_initrc_exec_t);
  13. type xonotic_var_log_t;
  14. logging_log_file(xonotic_var_log_t)
  15. type xonotic_opt_t;
  16. files_type(xonotic_opt_t)
  17. ########################################
  18. #
  19. # Local policy
  20. #
  21. allow xonotic_t self:udp_socket create_socket_perms;
  22. allow xonotic_t self:netlink_route_socket { write getattr read bind create nlmsg_read };
  23. allow xonotic_t self:tcp_socket { write getattr connect read getopt create };
  24. manage_dirs_pattern(xonotic_t, xonotic_var_log_t, xonotic_var_log_t)
  25. append_files_pattern(xonotic_t, xonotic_var_log_t, xonotic_var_log_t)
  26. create_files_pattern(xonotic_t, xonotic_var_log_t, xonotic_var_log_t)
  27. logging_log_filetrans(xonotic_t, xonotic_var_log_t, file)
  28. manage_dirs_pattern(xonotic_t, xonotic_opt_t, xonotic_opt_t)
  29. manage_files_pattern(xonotic_t, xonotic_opt_t, xonotic_opt_t)
  30. type_transition xonotic_t xonotic_opt_t:file xonotic_opt_t;
  31. corenet_udp_bind_generic_node(xonotic_t)
  32. kernel_read_system_state(xonotic_t)
  33. corenet_udp_bind_all_unreserved_ports(xonotic_t)
  34. dev_read_urand(xonotic_t)
  35. auth_use_nsswitch(xonotic_t)
  36. corenet_tcp_connect_all_reserved_ports(xonotic_t)
  37. sysnet_read_config(xonotic_t)
  38. miscfiles_read_localization(xonotic_t)
  39. supervisor_service_domain(xonotic_t,xonotic_exec_t)
  40. optional_policy(`
  41. gen_require(`
  42. type supervisor_t;
  43. ')
  44. allow supervisor_t xonotic_opt_t:dir search;
  45. ')