unconfined.te 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. policy_module(unconfined, 3.6.2)
  2. ########################################
  3. #
  4. # Declarations
  5. #
  6. # usage in this module of types created by these
  7. # calls is not correct, however we dont currently
  8. # have another method to add access to these types
  9. userdom_base_user_template(unconfined)
  10. userdom_manage_home_role(unconfined_r, unconfined_t)
  11. userdom_manage_tmp_role(unconfined_r, unconfined_t)
  12. userdom_manage_tmpfs_role(unconfined_r, unconfined_t)
  13. type unconfined_exec_t;
  14. init_system_domain(unconfined_t, unconfined_exec_t)
  15. type unconfined_execmem_t;
  16. type unconfined_execmem_exec_t;
  17. init_system_domain(unconfined_execmem_t, unconfined_execmem_exec_t)
  18. role unconfined_r types unconfined_execmem_t;
  19. ########################################
  20. #
  21. # Local policy
  22. #
  23. domtrans_pattern(unconfined_t, unconfined_execmem_exec_t, unconfined_execmem_t)
  24. files_create_boot_flag(unconfined_t)
  25. mcs_killall(unconfined_t)
  26. mcs_ptrace_all(unconfined_t)
  27. libs_run_ldconfig(unconfined_t, unconfined_r)
  28. logging_send_syslog_msg(unconfined_t)
  29. logging_run_auditctl(unconfined_t, unconfined_r)
  30. mount_run_unconfined(unconfined_t, unconfined_r)
  31. seutil_run_setfiles(unconfined_t, unconfined_r)
  32. seutil_run_semanage(unconfined_t, unconfined_r)
  33. unconfined_domain(unconfined_t)
  34. userdom_user_home_dir_filetrans_user_home_content(unconfined_t, { dir file lnk_file fifo_file sock_file })
  35. ifdef(`direct_sysadm_daemon',`
  36. optional_policy(`
  37. init_run_daemon(unconfined_t, unconfined_r)
  38. ')
  39. ',`
  40. ifdef(`distro_gentoo',`
  41. seutil_run_runinit(unconfined_t, unconfined_r)
  42. seutil_init_script_run_runinit(unconfined_t, unconfined_r)
  43. ')
  44. ')
  45. optional_policy(`
  46. systemd_config_all_services(unconfined_t)
  47. init_status(unconfined_t)
  48. ')
  49. optional_policy(`
  50. ada_domtrans(unconfined_t)
  51. ')
  52. optional_policy(`
  53. apache_run_helper(unconfined_t, unconfined_r)
  54. apache_role(unconfined_r, unconfined_t)
  55. ')
  56. optional_policy(`
  57. bind_run_ndc(unconfined_t, unconfined_r)
  58. ')
  59. optional_policy(`
  60. bootloader_run(unconfined_t, unconfined_r)
  61. ')
  62. optional_policy(`
  63. cron_unconfined_role(unconfined_r, unconfined_t)
  64. ')
  65. optional_policy(`
  66. dpkg_run(unconfined_t, unconfined_r)
  67. ')
  68. optional_policy(`
  69. firstboot_run(unconfined_t, unconfined_r)
  70. ')
  71. optional_policy(`
  72. ftp_run_ftpdctl(unconfined_t, unconfined_r)
  73. ')
  74. optional_policy(`
  75. hadoop_role(unconfined_r, unconfined_t)
  76. ')
  77. optional_policy(`
  78. inn_domtrans(unconfined_t)
  79. ')
  80. optional_policy(`
  81. java_run_unconfined(unconfined_t, unconfined_r)
  82. ')
  83. optional_policy(`
  84. lpd_run_checkpc(unconfined_t, unconfined_r)
  85. ')
  86. optional_policy(`
  87. modutils_run_update_mods(unconfined_t, unconfined_r)
  88. ')
  89. optional_policy(`
  90. mono_domtrans(unconfined_t)
  91. ')
  92. optional_policy(`
  93. mta_role(unconfined_r, unconfined_t)
  94. ')
  95. optional_policy(`
  96. oddjob_domtrans_mkhomedir(unconfined_t)
  97. ')
  98. optional_policy(`
  99. portage_run(unconfined_t, unconfined_r)
  100. portage_run_fetch(unconfined_t, unconfined_r)
  101. portage_run_gcc_config(unconfined_t, unconfined_r)
  102. ')
  103. optional_policy(`
  104. prelink_run(unconfined_t, unconfined_r)
  105. ')
  106. optional_policy(`
  107. portmap_run_helper(unconfined_t, unconfined_r)
  108. ')
  109. optional_policy(`
  110. postfix_run_map(unconfined_t, unconfined_r)
  111. # cjp: this should probably be removed:
  112. postfix_domtrans_master(unconfined_t)
  113. gen_require(`
  114. type postfix_master_t;
  115. ')
  116. role unconfined_r types postfix_master_t;
  117. ')
  118. optional_policy(`
  119. pyzor_role(unconfined_r, unconfined_t)
  120. ')
  121. optional_policy(`
  122. # cjp: this should probably be removed:
  123. rpc_domtrans_nfsd(unconfined_t)
  124. ')
  125. optional_policy(`
  126. rtkit_scheduled(unconfined_t)
  127. ')
  128. optional_policy(`
  129. rpm_run(unconfined_t, unconfined_r)
  130. ')
  131. optional_policy(`
  132. samba_run_net(unconfined_t, unconfined_r)
  133. samba_run_winbind_helper(unconfined_t, unconfined_r)
  134. ')
  135. optional_policy(`
  136. spamassassin_role(unconfined_r, unconfined_t)
  137. ')
  138. optional_policy(`
  139. sysnet_run_dhcpc(unconfined_t, unconfined_r)
  140. sysnet_dbus_chat_dhcpc(unconfined_t)
  141. ')
  142. optional_policy(`
  143. tzdata_run(unconfined_t, unconfined_r)
  144. ')
  145. optional_policy(`
  146. unconfined_dbus_chat(unconfined_t)
  147. ')
  148. optional_policy(`
  149. usermanage_run_admin_passwd(unconfined_t, unconfined_r)
  150. ')
  151. optional_policy(`
  152. vpn_run(unconfined_t, unconfined_r)
  153. ')
  154. optional_policy(`
  155. webalizer_run(unconfined_t, unconfined_r)
  156. ')
  157. optional_policy(`
  158. wine_domtrans(unconfined_t)
  159. ')
  160. optional_policy(`
  161. git_exec(unconfined_t)
  162. ')
  163. ########################################
  164. #
  165. # Unconfined Execmem Local policy
  166. #
  167. allow unconfined_execmem_t self:process { execstack execmem };
  168. unconfined_domain_noaudit(unconfined_execmem_t)
  169. optional_policy(`
  170. unconfined_dbus_chat(unconfined_execmem_t)
  171. ')