dirsrv.if 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. ## <summary>policy for dirsrv</summary>
  2. ########################################
  3. ## <summary>
  4. ## Execute a domain transition to run dirsrv.
  5. ## </summary>
  6. ## <param name="domain">
  7. ## <summary>
  8. ## Domain allowed to transition.
  9. ## </summary>
  10. ## </param>
  11. #
  12. interface(`dirsrv_domtrans',`
  13. gen_require(`
  14. type dirsrv_t, dirsrv_exec_t;
  15. ')
  16. domain_auto_trans($1,dirsrv_exec_t,dirsrv_t)
  17. allow dirsrv_t $1:fd use;
  18. allow dirsrv_t $1:fifo_file rw_file_perms;
  19. allow dirsrv_t $1:process sigchld;
  20. ')
  21. ########################################
  22. ## <summary>
  23. ## Allow caller to signal dirsrv.
  24. ## </summary>
  25. ## <param name="domain">
  26. ## <summary>
  27. ## Domain allowed access.
  28. ## </summary>
  29. ## </param>
  30. #
  31. interface(`dirsrv_signal',`
  32. gen_require(`
  33. type dirsrv_t;
  34. ')
  35. allow $1 dirsrv_t:process signal;
  36. ')
  37. ########################################
  38. ## <summary>
  39. ## Send a null signal to dirsrv.
  40. ## </summary>
  41. ## <param name="domain">
  42. ## <summary>
  43. ## Domain allowed access.
  44. ## </summary>
  45. ## </param>
  46. #
  47. interface(`dirsrv_signull',`
  48. gen_require(`
  49. type dirsrv_t;
  50. ')
  51. allow $1 dirsrv_t:process signull;
  52. ')
  53. #######################################
  54. ## <summary>
  55. ## Allow a domain to manage dirsrv logs.
  56. ## </summary>
  57. ## <param name="domain">
  58. ## <summary>
  59. ## Domain allowed access.
  60. ## </summary>
  61. ## </param>
  62. #
  63. interface(`dirsrv_manage_log',`
  64. gen_require(`
  65. type dirsrv_var_log_t;
  66. ')
  67. allow $1 dirsrv_var_log_t:dir manage_dir_perms;
  68. allow $1 dirsrv_var_log_t:file manage_file_perms;
  69. allow $1 dirsrv_var_log_t:fifo_file manage_fifo_file_perms;
  70. ')
  71. #######################################
  72. ## <summary>
  73. ## Allow a domain to manage dirsrv /var/lib files.
  74. ## </summary>
  75. ## <param name="domain">
  76. ## <summary>
  77. ## Domain allowed access.
  78. ## </summary>
  79. ## </param>
  80. #
  81. interface(`dirsrv_manage_var_lib',`
  82. gen_require(`
  83. type dirsrv_var_lib_t;
  84. ')
  85. allow $1 dirsrv_var_lib_t:dir manage_dir_perms;
  86. allow $1 dirsrv_var_lib_t:file manage_file_perms;
  87. ')
  88. #######################################
  89. ## <summary>
  90. ## Allow a domain to manage dirsrv /var/run files.
  91. ## </summary>
  92. ## <param name="domain">
  93. ## <summary>
  94. ## Domain allowed access.
  95. ## </summary>
  96. ## </param>
  97. #
  98. interface(`dirsrv_manage_var_run',`
  99. gen_require(`
  100. type dirsrv_var_run_t;
  101. ')
  102. allow $1 dirsrv_var_run_t:dir manage_dir_perms;
  103. allow $1 dirsrv_var_run_t:file manage_file_perms;
  104. allow $1 dirsrv_var_run_t:sock_file manage_file_perms;
  105. ')
  106. #####################################
  107. # <summary>
  108. # Allow a domain to create dirsrv pid directories.
  109. # </summary>
  110. # <param name="domain">
  111. # <summary>
  112. # Domain allowed access.
  113. # </summary>
  114. # </param>
  115. #
  116. interface(`dirsrv_pid_filetrans',`
  117. gen_require(`
  118. type dirsrv_var_run_t;
  119. ')
  120. # Allow creating a dir in /var/run with this type
  121. files_pid_filetrans($1, dirsrv_var_run_t, dir)
  122. ')
  123. #######################################
  124. ## <summary>
  125. ## Allow a domain to read dirsrv /var/run files.
  126. ## </summary>
  127. ## <param name="domain">
  128. ## <summary>
  129. ## Domain allowed access.
  130. ## </summary>
  131. ## </param>
  132. #
  133. interface(`dirsrv_read_var_run',`
  134. gen_require(`
  135. type dirsrv_var_run_t;
  136. ')
  137. allow $1 dirsrv_var_run_t:dir list_dir_perms;
  138. allow $1 dirsrv_var_run_t:file read_file_perms;
  139. ')
  140. ########################################
  141. ## <summary>
  142. ## Manage dirsrv configuration files.
  143. ## </summary>
  144. ## <param name="domain">
  145. ## <summary>
  146. ## Domain allowed access.
  147. ## </summary>
  148. ## </param>
  149. #
  150. interface(`dirsrv_manage_config',`
  151. gen_require(`
  152. type dirsrv_config_t;
  153. ')
  154. allow $1 dirsrv_config_t:dir manage_dir_perms;
  155. allow $1 dirsrv_config_t:file manage_file_perms;
  156. ')
  157. ########################################
  158. ## <summary>
  159. ## Read dirsrv share files.
  160. ## </summary>
  161. ## <param name="domain">
  162. ## <summary>
  163. ## Domain allowed access.
  164. ## </summary>
  165. ## </param>
  166. #
  167. interface(`dirsrv_read_share',`
  168. gen_require(`
  169. type dirsrv_share_t;
  170. ')
  171. allow $1 dirsrv_share_t:dir list_dir_perms;
  172. allow $1 dirsrv_share_t:file read_file_perms;
  173. allow $1 dirsrv_share_t:lnk_file read;
  174. ')