portage_additional.te 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. policy_module(portage_additional, 0.0.6)
  2. require {
  3. type portage_fetch_t;
  4. type portage_sandbox_t;
  5. type portage_t;
  6. type etc_t;
  7. type ldconfig_cache_t;
  8. type unlabeled_t;
  9. type usr_t;
  10. type portage_conf_t;
  11. type portage_ebuild_t;
  12. type proc_t;
  13. }
  14. allow portage_fetch_t self:process execmem;
  15. corenet_tcp_bind_generic_node(portage_fetch_t)
  16. files_list_boot(portage_fetch_t)
  17. files_list_default(portage_fetch_t)
  18. files_rw_etc_files(portage_fetch_t)
  19. kernel_read_crypto_sysctls(portage_fetch_t)
  20. dev_read_urand(portage_fetch_t)
  21. files_manage_var_files(portage_fetch_t)
  22. files_manage_var_dirs(portage_fetch_t)
  23. files_search_src(portage_fetch_t)
  24. files_getattr_usr_src_files(portage_fetch_t)
  25. fs_getattr_xattr_fs(portage_fetch_t)
  26. files_manage_var_lib_dirs(portage_fetch_t)
  27. manage_files_pattern(portage_fetch_t, var_lib_t, var_lib_t)
  28. allow portage_fetch_t portage_conf_t:file write;
  29. allow portage_fetch_t etc_t:file link;
  30. allow portage_fetch_t portage_ebuild_t:file map;
  31. corenet_udp_bind_generic_node(portage_t)
  32. corenet_tcp_bind_generic_node(portage_t)
  33. files_manage_etc_files(portage_t)
  34. kernel_read_crypto_sysctls(portage_t)
  35. allow portage_t self:process ptrace;
  36. allow portage_t self:capability sys_resource;
  37. allow portage_t unlabeled_t:file { execute execute_no_trans map relabelfrom relabelto };
  38. allow portage_t usr_t:file { execute execute_no_trans };
  39. allow portage_t etc_t:file { relabelfrom relabelto };
  40. allow portage_t self:dir { add_name write };
  41. allow portage_t self:file create;
  42. allow portage_t proc_t:filesystem associate;
  43. kernel_read_crypto_sysctls(portage_sandbox_t)
  44. auth_getattr_shadow(portage_sandbox_t)
  45. allow portage_sandbox_t ldconfig_cache_t:file map;
  46. dev_rw_zero(portage_sandbox_t)