shutdown.te 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. policy_module(shutdown, 1.2.1)
  2. ########################################
  3. #
  4. # Declarations
  5. #
  6. attribute_role shutdown_roles;
  7. type shutdown_t;
  8. type shutdown_exec_t;
  9. init_system_domain(shutdown_t, shutdown_exec_t)
  10. application_domain(shutdown_t, shutdown_exec_t)
  11. role shutdown_roles types shutdown_t;
  12. type shutdown_etc_t;
  13. files_config_file(shutdown_etc_t)
  14. type shutdown_var_run_t;
  15. files_pid_file(shutdown_var_run_t)
  16. ########################################
  17. #
  18. # Local policy
  19. #
  20. allow shutdown_t self:capability { dac_override kill setuid sys_nice sys_tty_config };
  21. allow shutdown_t self:process { setsched signal signull };
  22. allow shutdown_t self:fifo_file manage_fifo_file_perms;
  23. allow shutdown_t self:unix_stream_socket create_stream_socket_perms;
  24. manage_files_pattern(shutdown_t, shutdown_etc_t, shutdown_etc_t)
  25. files_etc_filetrans(shutdown_t, shutdown_etc_t, file)
  26. manage_files_pattern(shutdown_t, shutdown_var_run_t, shutdown_var_run_t)
  27. files_pid_filetrans(shutdown_t, shutdown_var_run_t, file)
  28. kernel_read_system_state(shutdown_t)
  29. domain_use_interactive_fds(shutdown_t)
  30. files_delete_boot_flag(shutdown_t)
  31. files_read_generic_pids(shutdown_t)
  32. mls_file_write_to_clearance(shutdown_t)
  33. term_use_all_terms(shutdown_t)
  34. auth_use_nsswitch(shutdown_t)
  35. auth_write_login_records(shutdown_t)
  36. init_rw_utmp(shutdown_t)
  37. init_stream_connect(shutdown_t)
  38. init_telinit(shutdown_t)
  39. logging_search_logs(shutdown_t)
  40. logging_send_audit_msgs(shutdown_t)
  41. logging_send_syslog_msg(shutdown_t)
  42. miscfiles_read_localization(shutdown_t)
  43. optional_policy(`
  44. cron_system_entry(shutdown_t, shutdown_exec_t)
  45. ')
  46. optional_policy(`
  47. dbus_system_bus_client(shutdown_t)
  48. dbus_connect_system_bus(shutdown_t)
  49. ')
  50. optional_policy(`
  51. oddjob_dontaudit_rw_fifo_files(shutdown_t)
  52. oddjob_sigchld(shutdown_t)
  53. ')
  54. optional_policy(`
  55. xserver_dontaudit_write_log(shutdown_t)
  56. ')