123 lines
2.6 KiB
Plaintext
123 lines
2.6 KiB
Plaintext
policy_module(cpucontrol, 1.3.0)
|
|
|
|
########################################
|
|
#
|
|
# Declarations
|
|
#
|
|
|
|
type cpucontrol_t;
|
|
type cpucontrol_exec_t;
|
|
init_system_domain(cpucontrol_t, cpucontrol_exec_t)
|
|
|
|
type cpucontrol_conf_t;
|
|
files_type(cpucontrol_conf_t)
|
|
|
|
type cpuspeed_t;
|
|
type cpuspeed_exec_t;
|
|
init_system_domain(cpuspeed_t, cpuspeed_exec_t)
|
|
|
|
type cpuspeed_var_run_t;
|
|
files_pid_file(cpuspeed_var_run_t)
|
|
|
|
########################################
|
|
#
|
|
# CPU microcode loader local policy
|
|
#
|
|
|
|
allow cpucontrol_t self:capability { ipc_lock sys_rawio };
|
|
dontaudit cpucontrol_t self:capability sys_tty_config;
|
|
allow cpucontrol_t self:process signal_perms;
|
|
|
|
allow cpucontrol_t cpucontrol_conf_t:dir list_dir_perms;
|
|
read_files_pattern(cpucontrol_t, cpucontrol_conf_t, cpucontrol_conf_t)
|
|
read_lnk_files_pattern(cpucontrol_t, cpucontrol_conf_t, cpucontrol_conf_t)
|
|
|
|
kernel_list_proc(cpucontrol_t)
|
|
kernel_read_proc_symlinks(cpucontrol_t)
|
|
kernel_read_kernel_sysctls(cpucontrol_t)
|
|
|
|
dev_read_sysfs(cpucontrol_t)
|
|
dev_rw_cpu_microcode(cpucontrol_t)
|
|
|
|
fs_search_auto_mountpoints(cpucontrol_t)
|
|
|
|
term_dontaudit_use_console(cpucontrol_t)
|
|
|
|
domain_use_interactive_fds(cpucontrol_t)
|
|
|
|
files_list_usr(cpucontrol_t)
|
|
|
|
init_use_fds(cpucontrol_t)
|
|
init_use_script_ptys(cpucontrol_t)
|
|
|
|
logging_send_syslog_msg(cpucontrol_t)
|
|
|
|
userdom_dontaudit_use_unpriv_user_fds(cpucontrol_t)
|
|
|
|
optional_policy(`
|
|
nscd_socket_use(cpucontrol_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
rhgb_use_ptys(cpucontrol_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
seutil_sigchld_newrole(cpucontrol_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
udev_read_db(cpucontrol_t)
|
|
')
|
|
|
|
########################################
|
|
#
|
|
# CPU frequency scaling daemons
|
|
#
|
|
|
|
dontaudit cpuspeed_t self:capability sys_tty_config;
|
|
allow cpuspeed_t self:process { signal_perms setsched };
|
|
allow cpuspeed_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow cpuspeed_t cpuspeed_var_run_t:file manage_file_perms;
|
|
files_pid_filetrans(cpuspeed_t, cpuspeed_var_run_t, file)
|
|
|
|
kernel_read_system_state(cpuspeed_t)
|
|
kernel_read_kernel_sysctls(cpuspeed_t)
|
|
|
|
dev_write_sysfs_dirs(cpuspeed_t)
|
|
dev_rw_sysfs(cpuspeed_t)
|
|
|
|
domain_use_interactive_fds(cpuspeed_t)
|
|
# for demand/load-based scaling:
|
|
domain_read_all_domains_state(cpuspeed_t)
|
|
|
|
files_read_etc_files(cpuspeed_t)
|
|
files_read_etc_runtime_files(cpuspeed_t)
|
|
files_list_usr(cpuspeed_t)
|
|
|
|
fs_search_auto_mountpoints(cpuspeed_t)
|
|
|
|
term_dontaudit_use_console(cpuspeed_t)
|
|
|
|
init_use_fds(cpuspeed_t)
|
|
init_use_script_ptys(cpuspeed_t)
|
|
|
|
logging_send_syslog_msg(cpuspeed_t)
|
|
|
|
miscfiles_read_localization(cpuspeed_t)
|
|
|
|
userdom_dontaudit_use_unpriv_user_fds(cpuspeed_t)
|
|
|
|
optional_policy(`
|
|
nscd_socket_use(cpuspeed_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
seutil_sigchld_newrole(cpuspeed_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
udev_read_db(cpuspeed_t)
|
|
')
|