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