2005-09-20 18:15:35 +00:00
|
|
|
|
2005-12-09 16:38:39 +00:00
|
|
|
policy_module(cpucontrol,1.0.0)
|
2005-09-20 18:15:35 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type cpucontrol_t;
|
|
|
|
type cpucontrol_exec_t;
|
2005-10-24 22:08:13 +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;
|
2005-10-24 22:08:13 +00:00
|
|
|
init_system_domain(cpuspeed_t,cpuspeed_exec_t)
|
2005-09-20 18:15:35 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# CPU microcode loader local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow cpucontrol_t self:capability sys_rawio;
|
|
|
|
dontaudit cpucontrol_t self:capability sys_tty_config;
|
|
|
|
allow cpucontrol_t self:process signal_perms;
|
|
|
|
|
|
|
|
allow cpucontrol_t cpucontrol_conf_t:dir r_dir_perms;
|
|
|
|
allow cpucontrol_t cpucontrol_conf_t:file r_file_perms;
|
|
|
|
allow cpucontrol_t cpucontrol_conf_t:lnk_file { getattr read };
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
domain_use_wide_inherit_fd(cpucontrol_t)
|
|
|
|
|
|
|
|
files_list_usr(cpucontrol_t)
|
|
|
|
|
|
|
|
init_use_fd(cpucontrol_t)
|
|
|
|
init_use_script_pty(cpucontrol_t)
|
|
|
|
|
|
|
|
libs_use_ld_so(cpucontrol_t)
|
|
|
|
libs_use_shared_libs(cpucontrol_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(cpucontrol_t)
|
|
|
|
|
|
|
|
userdom_dontaudit_use_unpriv_user_fd(cpucontrol_t)
|
|
|
|
|
|
|
|
ifdef(`targeted_policy',`
|
|
|
|
term_dontaudit_use_unallocated_tty(cpucontrol_t)
|
|
|
|
term_dontaudit_use_generic_pty(cpucontrol_t)
|
|
|
|
files_dontaudit_read_root_file(cpucontrol_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`nscd',`
|
2005-10-24 22:08:13 +00:00
|
|
|
nscd_use_socket(cpucontrol_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`selinuxutil',`
|
2005-09-20 18:15:35 +00:00
|
|
|
seutil_sigchld_newrole(cpucontrol_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`udev',`
|
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;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
dev_rw_sysfs(cpuspeed_t)
|
|
|
|
|
|
|
|
fs_search_auto_mountpoints(cpuspeed_t)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(cpuspeed_t)
|
|
|
|
|
|
|
|
domain_use_wide_inherit_fd(cpuspeed_t)
|
|
|
|
|
|
|
|
files_read_etc_files(cpuspeed_t)
|
|
|
|
files_read_etc_runtime_files(cpuspeed_t)
|
|
|
|
files_list_usr(cpuspeed_t)
|
|
|
|
|
|
|
|
init_use_fd(cpuspeed_t)
|
|
|
|
init_use_script_pty(cpuspeed_t)
|
|
|
|
|
|
|
|
libs_use_ld_so(cpuspeed_t)
|
|
|
|
libs_use_shared_libs(cpuspeed_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(cpuspeed_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(cpuspeed_t)
|
|
|
|
|
|
|
|
userdom_dontaudit_use_unpriv_user_fd(cpuspeed_t)
|
|
|
|
|
|
|
|
ifdef(`targeted_policy',`
|
|
|
|
term_dontaudit_use_unallocated_tty(cpuspeed_t)
|
|
|
|
term_dontaudit_use_generic_pty(cpuspeed_t)
|
|
|
|
files_dontaudit_read_root_file(cpuspeed_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`nscd',`
|
2005-10-24 22:08:13 +00:00
|
|
|
nscd_use_socket(cpuspeed_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`selinuxutil',`
|
2005-09-20 18:15:35 +00:00
|
|
|
seutil_sigchld_newrole(cpuspeed_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`udev',`
|
2005-09-20 18:15:35 +00:00
|
|
|
udev_read_db(cpuspeed_t)
|
|
|
|
')
|