selinux-refpolicy/policy/modules/services/cpucontrol.te

138 lines
3.0 KiB
Plaintext
Raw Normal View History

2005-09-20 18:15:35 +00:00
2007-04-17 13:28:09 +00:00
policy_module(cpucontrol,1.2.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
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
#
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;
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)
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)
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
ifdef(`targeted_policy',`
2006-02-02 21:08:12 +00:00
term_dontaudit_use_unallocated_ttys(cpucontrol_t)
term_dontaudit_use_generic_ptys(cpucontrol_t)
files_dontaudit_read_root_files(cpucontrol_t)
2005-09-20 18:15:35 +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
')
optional_policy(`
2005-09-20 18:15:35 +00:00
seutil_sigchld_newrole(cpucontrol_t)
')
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;
files_pid_filetrans(cpuspeed_t,cpuspeed_var_run_t,file)
2005-09-20 18:15:35 +00:00
kernel_read_system_state(cpuspeed_t)
kernel_read_kernel_sysctls(cpuspeed_t)
2005-09-20 18:15:35 +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)
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
ifdef(`targeted_policy',`
2006-02-02 21:08:12 +00:00
term_dontaudit_use_unallocated_ttys(cpuspeed_t)
term_dontaudit_use_generic_ptys(cpuspeed_t)
files_dontaudit_read_root_files(cpuspeed_t)
2005-09-20 18:15:35 +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
')
optional_policy(`
2005-09-20 18:15:35 +00:00
seutil_sigchld_newrole(cpuspeed_t)
')
optional_policy(`
2005-09-20 18:15:35 +00:00
udev_read_db(cpuspeed_t)
')