sshguard.te 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. policy_module(sshguard, 0.1.6)
  2. ########################################
  3. #
  4. # Declarations
  5. #
  6. attribute_role sshguard_roles;
  7. type sshguard_t;
  8. type sshguard_exec_t;
  9. init_daemon_domain(sshguard_t, sshguard_exec_t)
  10. role sshguard_roles types sshguard_t;
  11. type sshguard_etc_t;
  12. files_config_file(sshguard_etc_t)
  13. type sshguard_initrc_exec_t;
  14. init_script_file(sshguard_initrc_exec_t)
  15. type sshguard_var_run_t;
  16. files_pid_file(sshguard_var_run_t)
  17. ########################################
  18. #
  19. # Local policy
  20. #
  21. allow sshguard_t self:fifo_file { getattr read write };
  22. allow sshguard_t self:netlink_route_socket { bind create getattr nlmsg_read read write };
  23. allow sshguard_t self:udp_socket { connect create getattr read write };
  24. manage_files_pattern(sshguard_t, sshguard_var_run_t, sshguard_var_run_t)
  25. files_pid_filetrans(sshguard_t, sshguard_var_run_t, file)
  26. read_files_pattern(sshguard_t, sshguard_etc_t, sshguard_etc_t)
  27. iptables_domtrans(sshguard_t)
  28. logging_send_syslog_msg(sshguard_t)
  29. logging_read_all_logs(sshguard_t)
  30. corecmd_exec_shell(sshguard_t)
  31. corecmd_exec_bin(sshguard_t)
  32. miscfiles_read_localization(sshguard_t)
  33. auth_use_nsswitch(sshguard_t)
  34. sysnet_read_config(sshguard_t)
  35. gen_require(`
  36. type iptables_t;
  37. ')
  38. logging_read_all_logs(iptables_t)