## The rasdaemon program is a daemon with monitors the RAS trace events from /sys/kernel/debug/tracing ######################################## ## ## Execute TEMPLATE in the rasdaemon domin. ## ## ## ## Domain allowed to transition. ## ## # interface(`rasdaemon_domtrans',` gen_require(` type rasdaemon_t, rasdaemon_exec_t; ') corecmd_search_bin($1) domtrans_pattern($1, rasdaemon_exec_t, rasdaemon_t) ') ######################################## ## ## Search rasdaemon lib directories. ## ## ## ## Domain allowed access. ## ## # interface(`rasdaemon_search_lib',` gen_require(` type rasdaemon_var_lib_t; ') allow $1 rasdaemon_var_lib_t:dir search_dir_perms; files_search_var_lib($1) ') ######################################## ## ## Read rasdaemon lib files. ## ## ## ## Domain allowed access. ## ## # interface(`rasdaemon_read_lib_files',` gen_require(` type rasdaemon_var_lib_t; ') files_search_var_lib($1) read_files_pattern($1, rasdaemon_var_lib_t, rasdaemon_var_lib_t) ') ######################################## ## ## Manage rasdaemon lib files. ## ## ## ## Domain allowed access. ## ## # interface(`rasdaemon_manage_lib_files',` gen_require(` type rasdaemon_var_lib_t; ') files_search_var_lib($1) manage_files_pattern($1, rasdaemon_var_lib_t, rasdaemon_var_lib_t) ') ######################################## ## ## Manage rasdaemon lib directories. ## ## ## ## Domain allowed access. ## ## # interface(`rasdaemon_manage_lib_dirs',` gen_require(` type rasdaemon_var_lib_t; ') files_search_var_lib($1) manage_dirs_pattern($1, rasdaemon_var_lib_t, rasdaemon_var_lib_t) ') ######################################## ## ## Execute rasdaemon server in the rasdaemon domain. ## ## ## ## Domain allowed to transition. ## ## # interface(`rasdaemon_systemctl',` gen_require(` type rasdaemon_t; type rasdaemon_unit_file_t; ') systemd_exec_systemctl($1) init_reload_services($1) systemd_read_fifo_file_passwd_run($1) allow $1 rasdaemon_unit_file_t:file read_file_perms; allow $1 rasdaemon_unit_file_t:service manage_service_perms; ps_process_pattern($1, rasdaemon_t) ') ######################################## ## ## All of the rules required to administrate ## an rasdaemon environment ## ## ## ## Domain allowed access. ## ## ## # interface(`rasdaemon_admin',` gen_require(` type rasdaemon_t; type rasdaemon_var_lib_t; type rasdaemon_unit_file_t; ') allow $1 rasdaemon_t:process { ptrace signal_perms }; ps_process_pattern($1, rasdaemon_t) files_search_var_lib($1) admin_pattern($1, rasdaemon_var_lib_t) rasdaemon_systemctl($1) admin_pattern($1, rasdaemon_unit_file_t) allow $1 rasdaemon_unit_file_t:service all_service_perms; optional_policy(` systemd_passwd_agent_exec($1) systemd_read_fifo_file_passwd_run($1) ') ')