129 lines
2.7 KiB
Plaintext
129 lines
2.7 KiB
Plaintext
|
|
policy_module(cpucontrol,1.0.0)
|
|
|
|
########################################
|
|
#
|
|
# Declarations
|
|
#
|
|
|
|
type cpucontrol_t;
|
|
type cpucontrol_exec_t;
|
|
init_system_domain(cpucontrol_t,cpucontrol_exec_t)
|
|
|
|
type cpucontrol_conf_t;
|
|
files_type(cpucontrol_conf_t)
|
|
|
|
type cpuspeed_t;
|
|
type cpuspeed_exec_t;
|
|
init_system_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_sysctls(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_interactive_fds(cpucontrol_t)
|
|
|
|
files_list_usr(cpucontrol_t)
|
|
|
|
init_use_fds(cpucontrol_t)
|
|
init_use_script_ptys(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_fds(cpucontrol_t)
|
|
|
|
ifdef(`targeted_policy',`
|
|
term_dontaudit_use_unallocated_ttys(cpucontrol_t)
|
|
term_dontaudit_use_generic_ptys(cpucontrol_t)
|
|
files_dontaudit_read_root_files(cpucontrol_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
nscd_socket_use(cpucontrol_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
seutil_sigchld_newrole(cpucontrol_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
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)
|
|
kernel_read_kernel_sysctls(cpuspeed_t)
|
|
|
|
dev_rw_sysfs(cpuspeed_t)
|
|
|
|
fs_search_auto_mountpoints(cpuspeed_t)
|
|
|
|
term_dontaudit_use_console(cpuspeed_t)
|
|
|
|
domain_use_interactive_fds(cpuspeed_t)
|
|
|
|
files_read_etc_files(cpuspeed_t)
|
|
files_read_etc_runtime_files(cpuspeed_t)
|
|
files_list_usr(cpuspeed_t)
|
|
|
|
init_use_fds(cpuspeed_t)
|
|
init_use_script_ptys(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_fds(cpuspeed_t)
|
|
|
|
ifdef(`targeted_policy',`
|
|
term_dontaudit_use_unallocated_ttys(cpuspeed_t)
|
|
term_dontaudit_use_generic_ptys(cpuspeed_t)
|
|
files_dontaudit_read_root_files(cpuspeed_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
nscd_socket_use(cpuspeed_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
seutil_sigchld_newrole(cpuspeed_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
udev_read_db(cpuspeed_t)
|
|
')
|