portage_additional.te 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. policy_module(portage_additional, 0.0.11)
  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. type zero_device_t;
  14. type cert_t;
  15. type porticron_t;
  16. type portage_tmp_t;
  17. type dri_device_t;
  18. }
  19. allow portage_t dri_device_t:chr_file getattr;
  20. allow portage_t portage_fetch_t:unix_stream_socket connectto;
  21. allow portage_sandbox_t dri_device_t:chr_file getattr;
  22. allow portage_sandbox_t self:capability sys_ptrace;
  23. corenet_tcp_bind_generic_node(portage_fetch_t)
  24. files_list_boot(portage_fetch_t)
  25. files_list_default(portage_fetch_t)
  26. files_rw_etc_files(portage_fetch_t)
  27. kernel_read_crypto_sysctls(portage_fetch_t)
  28. dev_read_urand(portage_fetch_t)
  29. files_manage_var_files(portage_fetch_t)
  30. files_manage_var_dirs(portage_fetch_t)
  31. files_search_src(portage_fetch_t)
  32. files_getattr_usr_src_files(portage_fetch_t)
  33. fs_getattr_xattr_fs(portage_fetch_t)
  34. files_manage_var_lib_dirs(portage_fetch_t)
  35. manage_files_pattern(portage_fetch_t, var_lib_t, var_lib_t)
  36. files_manage_var_symlinks(portage_fetch_t)
  37. allow portage_fetch_t portage_conf_t:file write;
  38. allow portage_fetch_t etc_t:file { link unlink };
  39. allow portage_fetch_t portage_ebuild_t:file map;
  40. allow portage_fetch_t self:process execmem;
  41. allow portage_fetch_t portage_tmp_t:dir watch;
  42. corenet_udp_bind_generic_node(portage_t)
  43. corenet_tcp_bind_generic_node(portage_t)
  44. files_manage_etc_files(portage_t)
  45. kernel_read_crypto_sysctls(portage_t)
  46. allow portage_t self:process ptrace;
  47. allow portage_t self:capability sys_resource;
  48. allow portage_t unlabeled_t:file { execute execute_no_trans map relabelfrom relabelto };
  49. allow portage_t usr_t:file { execute execute_no_trans };
  50. allow portage_t etc_t:file { relabelfrom relabelto };
  51. allow portage_t self:dir { add_name write };
  52. allow portage_t self:file create;
  53. allow portage_t proc_t:filesystem associate;
  54. allow portage_t cert_t:file map;
  55. allow portage_t portage_ebuild_t:file map;
  56. kernel_read_crypto_sysctls(portage_sandbox_t)
  57. auth_getattr_shadow(portage_sandbox_t)
  58. allow portage_sandbox_t ldconfig_cache_t:file map;
  59. dev_rw_zero(portage_sandbox_t)
  60. fs_getattr_cgroup(portage_sandbox_t)
  61. kernel_getattr_debugfs(portage_sandbox_t)
  62. dev_getattr_fs(portage_sandbox_t)
  63. fs_getattr_pstorefs(portage_sandbox_t)
  64. fs_getattr_tracefs(portage_sandbox_t)
  65. allow portage_sandbox_t zero_device_t:chr_file map;
  66. modutils_read_module_deps(portage_sandbox_t)
  67. allow portage_fetch_t porticron_t:fd use;