mysqldump.te 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. policy_module(mysqldump, 0.1.5)
  2. #################################
  3. #
  4. # Declarations
  5. #
  6. type mysqldump_t;
  7. type mysqldump_exec_t;
  8. init_system_domain(mysqldump_t, mysqldump_exec_t)
  9. type mysqldump_var_t;
  10. files_type(mysqldump_var_t)
  11. ########################################
  12. #
  13. # Local policy
  14. #
  15. allow mysqldump_t self:fifo_file { read write getattr ioctl };
  16. allow mysqldump_t self:process signal;
  17. optional_policy(`
  18. mysql_stream_connect(mysqldump_t)
  19. ')
  20. corecmd_exec_shell(mysqldump_t)
  21. corecmd_exec_bin(mysqldump_t)
  22. auth_use_nsswitch(mysqldump_t)
  23. miscfiles_read_localization(mysqldump_t)
  24. kernel_read_system_state(mysqldump_t)
  25. manage_dirs_pattern(mysqldump_t, mysqldump_var_t, mysqldump_var_t)
  26. manage_files_pattern(mysqldump_t, mysqldump_var_t, mysqldump_var_t)
  27. type_transition mysqldump_t mysqldump_var_t:file mysqldump_var_t;
  28. optional_policy(`
  29. gen_require(`
  30. type mysqld_etc_t;
  31. ')
  32. allow mysqldump_t mysqld_etc_t:dir { read open search getattr };
  33. allow mysqldump_t mysqld_etc_t:file { read getattr open };
  34. allow mysqldump_t mysqld_etc_t:lnk_file read;
  35. ')
  36. optional_policy(`
  37. gen_require(`
  38. type crond_tmp_t;
  39. ')
  40. allow mysqldump_t crond_tmp_t:file { read write ioctl };
  41. ')
  42. optional_policy(`
  43. gen_require(`
  44. type usr_t;
  45. ')
  46. allow mysqldump_t usr_t:file { read getattr open };
  47. ')
  48. optional_policy(`
  49. gen_require(`
  50. type backup_store_t;
  51. ')
  52. search_dirs_pattern(mysqldump_t, backup_store_t, backup_store_t)
  53. ')
  54. cron_system_entry(mysqldump_t, mysqldump_exec_t)