mysqldump.te 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. policy_module(mysqldump, 0.1.6)
  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. fs_getattr_xattr_fs(mysqldump_t)
  26. manage_dirs_pattern(mysqldump_t, mysqldump_var_t, mysqldump_var_t)
  27. manage_files_pattern(mysqldump_t, mysqldump_var_t, mysqldump_var_t)
  28. type_transition mysqldump_t mysqldump_var_t:file mysqldump_var_t;
  29. optional_policy(`
  30. gen_require(`
  31. type mysqld_etc_t;
  32. ')
  33. allow mysqldump_t mysqld_etc_t:dir { read open search getattr };
  34. allow mysqldump_t mysqld_etc_t:file { read getattr open };
  35. allow mysqldump_t mysqld_etc_t:lnk_file read;
  36. ')
  37. optional_policy(`
  38. gen_require(`
  39. type crond_tmp_t;
  40. ')
  41. allow mysqldump_t crond_tmp_t:file { read write ioctl };
  42. ')
  43. optional_policy(`
  44. gen_require(`
  45. type usr_t;
  46. ')
  47. allow mysqldump_t usr_t:file { read getattr open };
  48. ')
  49. optional_policy(`
  50. gen_require(`
  51. type backup_store_t;
  52. ')
  53. search_dirs_pattern(mysqldump_t, backup_store_t, backup_store_t)
  54. ')
  55. cron_system_entry(mysqldump_t, mysqldump_exec_t)