Chris PeBenito 921055
Chris PeBenito 5ea24b
policy_module(cpucontrol,1.0.0)
Chris PeBenito 921055
Chris PeBenito 921055
########################################
Chris PeBenito 921055
#
Chris PeBenito 921055
# Declarations
Chris PeBenito 921055
#
Chris PeBenito 921055
Chris PeBenito 921055
type cpucontrol_t;
Chris PeBenito 921055
type cpucontrol_exec_t;
Chris PeBenito 69dcd6
init_system_domain(cpucontrol_t,cpucontrol_exec_t)
Chris PeBenito 921055
Chris PeBenito 921055
type cpucontrol_conf_t;
Chris PeBenito 921055
files_type(cpucontrol_conf_t)
Chris PeBenito 921055
Chris PeBenito 921055
type cpuspeed_t;
Chris PeBenito 921055
type cpuspeed_exec_t;
Chris PeBenito 69dcd6
init_system_domain(cpuspeed_t,cpuspeed_exec_t)
Chris PeBenito 921055
Chris PeBenito 921055
########################################
Chris PeBenito 921055
#
Chris PeBenito 921055
# CPU microcode loader local policy
Chris PeBenito 921055
#
Chris PeBenito 921055
Chris PeBenito 921055
allow cpucontrol_t self:capability sys_rawio;
Chris PeBenito 921055
dontaudit cpucontrol_t self:capability sys_tty_config;
Chris PeBenito 921055
allow cpucontrol_t self:process signal_perms;
Chris PeBenito 921055
Chris PeBenito 921055
allow cpucontrol_t cpucontrol_conf_t:dir r_dir_perms;
Chris PeBenito 921055
allow cpucontrol_t cpucontrol_conf_t:file r_file_perms;
Chris PeBenito 921055
allow cpucontrol_t cpucontrol_conf_t:lnk_file { getattr read };
Chris PeBenito 921055
Chris PeBenito 921055
kernel_list_proc(cpucontrol_t)
Chris PeBenito 921055
kernel_read_proc_symlinks(cpucontrol_t)
Chris PeBenito 445522
kernel_read_kernel_sysctls(cpucontrol_t)
Chris PeBenito 921055
Chris PeBenito 921055
dev_read_sysfs(cpucontrol_t)
Chris PeBenito 921055
dev_rw_cpu_microcode(cpucontrol_t)
Chris PeBenito 921055
Chris PeBenito 921055
fs_search_auto_mountpoints(cpucontrol_t)
Chris PeBenito 921055
Chris PeBenito 921055
term_dontaudit_use_console(cpucontrol_t)
Chris PeBenito 921055
Chris PeBenito 15722e
domain_use_interactive_fds(cpucontrol_t)
Chris PeBenito 921055
Chris PeBenito 921055
files_list_usr(cpucontrol_t)
Chris PeBenito 921055
Chris PeBenito 1c1ac6
init_use_fds(cpucontrol_t)
Chris PeBenito 1815ba
init_use_script_ptys(cpucontrol_t)
Chris PeBenito 921055
Chris PeBenito 921055
libs_use_ld_so(cpucontrol_t)
Chris PeBenito 921055
libs_use_shared_libs(cpucontrol_t)
Chris PeBenito 921055
Chris PeBenito 921055
logging_send_syslog_msg(cpucontrol_t)
Chris PeBenito 921055
Chris PeBenito 15722e
userdom_dontaudit_use_unpriv_user_fds(cpucontrol_t)
Chris PeBenito 921055
Chris PeBenito 921055
ifdef(`targeted_policy',`
Chris PeBenito 1815ba
	term_dontaudit_use_unallocated_ttys(cpucontrol_t)
Chris PeBenito 1815ba
	term_dontaudit_use_generic_ptys(cpucontrol_t)
Chris PeBenito 9e04f5
	files_dontaudit_read_root_files(cpucontrol_t)
Chris PeBenito 921055
')
Chris PeBenito 921055
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 1815ba
	nscd_socket_use(cpucontrol_t)
Chris PeBenito 69dcd6
')
Chris PeBenito 69dcd6
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 921055
	seutil_sigchld_newrole(cpucontrol_t)
Chris PeBenito 921055
')
Chris PeBenito 921055
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 921055
	udev_read_db(cpucontrol_t)
Chris PeBenito 921055
')
Chris PeBenito 921055
Chris PeBenito 921055
########################################
Chris PeBenito 921055
#
Chris PeBenito 921055
# CPU frequency scaling daemons
Chris PeBenito 921055
#
Chris PeBenito 921055
Chris PeBenito 921055
dontaudit cpuspeed_t self:capability sys_tty_config;
Chris PeBenito 921055
allow cpuspeed_t self:process { signal_perms setsched };
Chris PeBenito 921055
allow cpuspeed_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 921055
Chris PeBenito 921055
kernel_read_system_state(cpuspeed_t)
Chris PeBenito 445522
kernel_read_kernel_sysctls(cpuspeed_t)
Chris PeBenito 921055
Chris PeBenito 921055
dev_rw_sysfs(cpuspeed_t)
Chris PeBenito 921055
Chris PeBenito 921055
fs_search_auto_mountpoints(cpuspeed_t)
Chris PeBenito 921055
Chris PeBenito 921055
term_dontaudit_use_console(cpuspeed_t)
Chris PeBenito 921055
Chris PeBenito 15722e
domain_use_interactive_fds(cpuspeed_t)
Chris PeBenito 921055
Chris PeBenito 921055
files_read_etc_files(cpuspeed_t)
Chris PeBenito 921055
files_read_etc_runtime_files(cpuspeed_t)
Chris PeBenito 921055
files_list_usr(cpuspeed_t)
Chris PeBenito 921055
Chris PeBenito 1c1ac6
init_use_fds(cpuspeed_t)
Chris PeBenito 1815ba
init_use_script_ptys(cpuspeed_t)
Chris PeBenito 921055
Chris PeBenito 921055
libs_use_ld_so(cpuspeed_t)
Chris PeBenito 921055
libs_use_shared_libs(cpuspeed_t)
Chris PeBenito 921055
Chris PeBenito 921055
logging_send_syslog_msg(cpuspeed_t)
Chris PeBenito 921055
Chris PeBenito 921055
miscfiles_read_localization(cpuspeed_t)
Chris PeBenito 921055
Chris PeBenito 15722e
userdom_dontaudit_use_unpriv_user_fds(cpuspeed_t)
Chris PeBenito 921055
Chris PeBenito 921055
ifdef(`targeted_policy',`
Chris PeBenito 1815ba
	term_dontaudit_use_unallocated_ttys(cpuspeed_t)
Chris PeBenito 1815ba
	term_dontaudit_use_generic_ptys(cpuspeed_t)
Chris PeBenito 9e04f5
	files_dontaudit_read_root_files(cpuspeed_t)
Chris PeBenito 921055
')
Chris PeBenito 921055
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 1815ba
	nscd_socket_use(cpuspeed_t)
Chris PeBenito 69dcd6
')
Chris PeBenito 69dcd6
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 921055
	seutil_sigchld_newrole(cpuspeed_t)
Chris PeBenito 921055
')
Chris PeBenito 921055
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 921055
	udev_read_db(cpuspeed_t)
Chris PeBenito 921055
')