2005-09-20 18:15:35 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
policy_module(cpucontrol, 1.3.0)
|
2005-09-20 18:15:35 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type cpucontrol_t;
|
|
|
|
type cpucontrol_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
init_system_domain(cpucontrol_t, cpucontrol_exec_t)
|
2005-09-20 18:15:35 +00:00
|
|
|
|
|
|
|
type cpucontrol_conf_t;
|
|
|
|
files_type(cpucontrol_conf_t)
|
|
|
|
|
|
|
|
type cpuspeed_t;
|
|
|
|
type cpuspeed_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
init_system_domain(cpuspeed_t, cpuspeed_exec_t)
|
2005-09-20 18:15:35 +00:00
|
|
|
|
2006-05-19 13:14:37 +00:00
|
|
|
type cpuspeed_var_run_t;
|
|
|
|
files_pid_file(cpuspeed_var_run_t)
|
|
|
|
|
2005-09-20 18:15:35 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# CPU microcode loader local policy
|
|
|
|
#
|
|
|
|
|
2006-08-29 02:41:00 +00:00
|
|
|
allow cpucontrol_t self:capability { ipc_lock sys_rawio };
|
2005-09-20 18:15:35 +00:00
|
|
|
dontaudit cpucontrol_t self:capability sys_tty_config;
|
|
|
|
allow cpucontrol_t self:process signal_perms;
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow cpucontrol_t cpucontrol_conf_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern(cpucontrol_t, cpucontrol_conf_t, cpucontrol_conf_t)
|
|
|
|
read_lnk_files_pattern(cpucontrol_t, cpucontrol_conf_t, cpucontrol_conf_t)
|
2005-09-20 18:15:35 +00:00
|
|
|
|
|
|
|
kernel_list_proc(cpucontrol_t)
|
|
|
|
kernel_read_proc_symlinks(cpucontrol_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(cpucontrol_t)
|
2005-09-20 18:15:35 +00:00
|
|
|
|
|
|
|
dev_read_sysfs(cpucontrol_t)
|
|
|
|
dev_rw_cpu_microcode(cpucontrol_t)
|
|
|
|
|
|
|
|
fs_search_auto_mountpoints(cpucontrol_t)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(cpucontrol_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(cpucontrol_t)
|
2005-09-20 18:15:35 +00:00
|
|
|
|
|
|
|
files_list_usr(cpucontrol_t)
|
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
init_use_fds(cpucontrol_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
init_use_script_ptys(cpucontrol_t)
|
2005-09-20 18:15:35 +00:00
|
|
|
|
|
|
|
libs_use_ld_so(cpucontrol_t)
|
|
|
|
libs_use_shared_libs(cpucontrol_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(cpucontrol_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(cpucontrol_t)
|
2005-09-20 18:15:35 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-02-02 21:08:12 +00:00
|
|
|
nscd_socket_use(cpucontrol_t)
|
2005-10-24 22:08:13 +00:00
|
|
|
')
|
|
|
|
|
2007-11-15 16:54:18 +00:00
|
|
|
optional_policy(`
|
|
|
|
rhgb_use_ptys(cpucontrol_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-20 18:15:35 +00:00
|
|
|
seutil_sigchld_newrole(cpucontrol_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-20 18:15:35 +00:00
|
|
|
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;
|
|
|
|
|
2006-05-19 13:14:37 +00:00
|
|
|
allow cpuspeed_t cpuspeed_var_run_t:file manage_file_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
files_pid_filetrans(cpuspeed_t, cpuspeed_var_run_t, file)
|
2006-05-19 13:14:37 +00:00
|
|
|
|
2005-09-20 18:15:35 +00:00
|
|
|
kernel_read_system_state(cpuspeed_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(cpuspeed_t)
|
2005-09-20 18:15:35 +00:00
|
|
|
|
2007-03-26 20:47:29 +00:00
|
|
|
dev_write_sysfs_dirs(cpuspeed_t)
|
2005-09-20 18:15:35 +00:00
|
|
|
dev_rw_sysfs(cpuspeed_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(cpuspeed_t)
|
2006-05-19 13:14:37 +00:00
|
|
|
# for demand/load-based scaling:
|
|
|
|
domain_read_all_domains_state(cpuspeed_t)
|
2005-09-20 18:15:35 +00:00
|
|
|
|
|
|
|
files_read_etc_files(cpuspeed_t)
|
|
|
|
files_read_etc_runtime_files(cpuspeed_t)
|
|
|
|
files_list_usr(cpuspeed_t)
|
|
|
|
|
2006-05-19 13:14:37 +00:00
|
|
|
fs_search_auto_mountpoints(cpuspeed_t)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(cpuspeed_t)
|
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
init_use_fds(cpuspeed_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
init_use_script_ptys(cpuspeed_t)
|
2005-09-20 18:15:35 +00:00
|
|
|
|
|
|
|
libs_use_ld_so(cpuspeed_t)
|
|
|
|
libs_use_shared_libs(cpuspeed_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(cpuspeed_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(cpuspeed_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(cpuspeed_t)
|
2005-09-20 18:15:35 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-02-02 21:08:12 +00:00
|
|
|
nscd_socket_use(cpuspeed_t)
|
2005-10-24 22:08:13 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-20 18:15:35 +00:00
|
|
|
seutil_sigchld_newrole(cpuspeed_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-20 18:15:35 +00:00
|
|
|
udev_read_db(cpuspeed_t)
|
|
|
|
')
|