acme-updater.te 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. policy_module(acme-updater, 0.1.19)
  2. #################################
  3. #
  4. # Declarations
  5. #
  6. type acmeupdater_t;
  7. type acmeupdater_exec_t;
  8. init_system_domain(acmeupdater_t, acmeupdater_exec_t)
  9. type acmeupdater_etc_t;
  10. files_config_file(acmeupdater_etc_t)
  11. ########################################
  12. #
  13. # Local policy
  14. #
  15. allow acmeupdater_t self:capability { dac_read_search dac_override sys_resource };
  16. allow acmeupdater_t self:fifo_file { getattr ioctl read write };
  17. allow acmeupdater_t self:process setrlimit;
  18. allow acmeupdater_t self:tcp_socket accept;
  19. corecmd_exec_bin(acmeupdater_t)
  20. corecmd_exec_shell(acmeupdater_t)
  21. corenet_tcp_bind_generic_node(acmeupdater_t)
  22. read_files_pattern(acmeupdater_t, acmeupdater_etc_t, acmeupdater_etc_t)
  23. miscfiles_read_localization(acmeupdater_t)
  24. miscfiles_read_generic_certs(acmeupdater_t)
  25. miscfiles_manage_generic_cert_files(acmeupdater_t)
  26. sysnet_dns_name_resolve(acmeupdater_t)
  27. files_manage_etc_files(acmeupdater_t)
  28. files_search_var_lib(acmeupdater_t)
  29. files_read_all_locks(acmeupdater_t)
  30. kernel_read_system_state(acmeupdater_t)
  31. dev_read_urand(acmeupdater_t)
  32. optional_policy(`
  33. gen_require(`
  34. type acmetool_var_lib_t;
  35. ')
  36. search_dirs_pattern(acmeupdater_t, acmetool_var_lib_t, acmetool_var_lib_t)
  37. read_files_pattern(acmeupdater_t, acmetool_var_lib_t, acmetool_var_lib_t)
  38. read_lnk_files_pattern(acmeupdater_t, acmetool_var_lib_t, acmetool_var_lib_t)
  39. ')
  40. apache_manage_config(acmeupdater_t)
  41. apache_domtrans(acmeupdater_t)
  42. jabber_admin(acmeupdater_t, system_r)
  43. optional_policy(`
  44. gen_require(`
  45. type httpd_initrc_exec_t;
  46. ')
  47. init_labeled_script_domtrans(acmeupdater_t, httpd_initrc_exec_t)
  48. ')
  49. optional_policy(`
  50. gen_require(`
  51. type dovecot_cert_t;
  52. ')
  53. manage_files_pattern(acmeupdater_t, dovecot_cert_t, dovecot_cert_t)
  54. ')
  55. optional_policy(`
  56. gen_require(`
  57. type dovecot_initrc_exec_t;
  58. ')
  59. init_labeled_script_domtrans(acmeupdater_t, dovecot_initrc_exec_t)
  60. ')
  61. optional_policy(`
  62. gen_require(`
  63. type postfix_etc_t;
  64. ')
  65. manage_files_pattern(acmeupdater_t, postfix_etc_t, postfix_etc_t)
  66. ')
  67. optional_policy(`
  68. gen_require(`
  69. type postfix_initrc_exec_t;
  70. ')
  71. init_labeled_script_domtrans(acmeupdater_t, postfix_initrc_exec_t)
  72. ')
  73. optional_policy(`
  74. cron_system_entry(acmeupdater_t, acmeupdater_exec_t)
  75. ')
  76. optional_policy(`
  77. gen_require(`
  78. type crond_tmp_t;
  79. ')
  80. allow acmeupdater_t crond_tmp_t:file { read write getattr ioctl };
  81. ')
  82. optional_policy(`
  83. gen_require(`
  84. type named_var_run_t;
  85. ')
  86. search_dirs_pattern(acmeupdater_t, named_var_run_t, named_var_run_t)
  87. read_files_pattern(acmeupdater_t, named_var_run_t, named_var_run_t)
  88. ')