2020-07-04 13:30:45 +00:00
|
|
|
policy_module(tuned, 1.7.1)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type tuned_t;
|
|
|
|
type tuned_exec_t;
|
|
|
|
init_daemon_domain(tuned_t, tuned_exec_t)
|
|
|
|
|
|
|
|
type tuned_initrc_exec_t;
|
|
|
|
init_script_file(tuned_initrc_exec_t)
|
|
|
|
|
|
|
|
type tuned_etc_t;
|
|
|
|
files_config_file(tuned_etc_t)
|
|
|
|
|
|
|
|
type tuned_rw_etc_t;
|
|
|
|
files_config_file(tuned_rw_etc_t)
|
|
|
|
|
|
|
|
type tuned_log_t;
|
|
|
|
logging_log_file(tuned_log_t)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
type tuned_runtime_t alias tuned_var_run_t;
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_file(tuned_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow tuned_t self:capability { sys_admin sys_nice };
|
|
|
|
dontaudit tuned_t self:capability { dac_override sys_tty_config };
|
|
|
|
allow tuned_t self:process { setsched signal };
|
|
|
|
allow tuned_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
|
|
|
|
read_files_pattern(tuned_t, tuned_etc_t, tuned_etc_t)
|
|
|
|
exec_files_pattern(tuned_t, tuned_etc_t, tuned_etc_t)
|
|
|
|
|
|
|
|
manage_files_pattern(tuned_t, tuned_etc_t, tuned_rw_etc_t)
|
|
|
|
files_etc_filetrans(tuned_t, tuned_rw_etc_t, file, "active_profile")
|
|
|
|
|
|
|
|
manage_dirs_pattern(tuned_t, tuned_log_t, tuned_log_t)
|
|
|
|
append_files_pattern(tuned_t, tuned_log_t, tuned_log_t)
|
|
|
|
create_files_pattern(tuned_t, tuned_log_t, tuned_log_t)
|
|
|
|
setattr_files_pattern(tuned_t, tuned_log_t, tuned_log_t)
|
|
|
|
logging_log_filetrans(tuned_t, tuned_log_t, file)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
manage_files_pattern(tuned_t, tuned_runtime_t, tuned_runtime_t)
|
|
|
|
manage_dirs_pattern(tuned_t, tuned_runtime_t, tuned_runtime_t)
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_filetrans(tuned_t, tuned_runtime_t, { dir file })
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(tuned_t)
|
|
|
|
kernel_read_network_state(tuned_t)
|
|
|
|
kernel_read_kernel_sysctls(tuned_t)
|
|
|
|
kernel_request_load_module(tuned_t)
|
|
|
|
kernel_rw_kernel_sysctl(tuned_t)
|
|
|
|
kernel_rw_hotplug_sysctls(tuned_t)
|
|
|
|
kernel_rw_vm_sysctls(tuned_t)
|
|
|
|
|
|
|
|
corecmd_exec_bin(tuned_t)
|
|
|
|
corecmd_exec_shell(tuned_t)
|
|
|
|
|
|
|
|
dev_getattr_all_blk_files(tuned_t)
|
|
|
|
dev_getattr_all_chr_files(tuned_t)
|
|
|
|
dev_read_urand(tuned_t)
|
|
|
|
dev_rw_sysfs(tuned_t)
|
2019-04-05 14:12:01 +00:00
|
|
|
dev_rw_pmqos(tuned_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
files_read_usr_files(tuned_t)
|
|
|
|
files_dontaudit_search_home(tuned_t)
|
|
|
|
files_dontaudit_list_tmp(tuned_t)
|
|
|
|
|
|
|
|
fs_getattr_xattr_fs(tuned_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(tuned_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(tuned_t)
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
udev_read_runtime_files(tuned_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
userdom_dontaudit_search_user_home_dirs(tuned_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
fstools_domtrans(tuned_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
mount_domtrans(tuned_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
sysnet_domtrans_ifconfig(tuned_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
unconfined_dbus_send(tuned_t)
|
|
|
|
')
|