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

133 lines
2.8 KiB
Plaintext
Raw Normal View History

2005-09-20 18:15:35 +00:00
policy_module(cpucontrol,1.0)
########################################
#
# Declarations
#
type cpucontrol_t;
type cpucontrol_exec_t;
init_daemon_domain(cpucontrol_t,cpucontrol_exec_t)
type cpucontrol_conf_t;
files_type(cpucontrol_conf_t)
type cpuspeed_t;
type cpuspeed_exec_t;
init_daemon_domain(cpuspeed_t,cpuspeed_exec_t)
########################################
#
# 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)
kernel_read_kernel_sysctl(cpucontrol_t)
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)
')
optional_policy(`selinuxutil.te',`
seutil_sigchld_newrole(cpucontrol_t)
')
optional_policy(`udev.te', `
udev_read_db(cpucontrol_t)
')
ifdef(`TODO',`
optional_policy(`rhgb.te',`
rhgb_domain(cpucontrol_t)
')
') dnl end TODO
########################################
#
# 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)
kernel_read_kernel_sysctl(cpuspeed_t)
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)
')
optional_policy(`selinuxutil.te',`
seutil_sigchld_newrole(cpuspeed_t)
')
optional_policy(`udev.te', `
udev_read_db(cpuspeed_t)
')
ifdef(`TODO',`
optional_policy(`rhgb.te',`
rhgb_domain(cpuspeed_t)
')
') dnl end TODO