2022-01-06 13:55:54 +00:00
|
|
|
policy_module(cgroup)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type cgclear_t;
|
|
|
|
type cgclear_exec_t;
|
|
|
|
init_daemon_domain(cgclear_t, cgclear_exec_t)
|
|
|
|
|
|
|
|
type cgred_t;
|
|
|
|
type cgred_exec_t;
|
|
|
|
init_daemon_domain(cgred_t, cgred_exec_t)
|
|
|
|
|
|
|
|
type cgred_initrc_exec_t;
|
|
|
|
init_script_file(cgred_initrc_exec_t)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
type cgred_runtime_t alias cgred_var_run_t;
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_file(cgred_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
2019-09-11 00:05:46 +00:00
|
|
|
type cgred_log_t;
|
|
|
|
logging_log_file(cgred_log_t)
|
|
|
|
|
2018-06-23 13:00:56 +00:00
|
|
|
type cgrules_etc_t;
|
|
|
|
files_config_file(cgrules_etc_t)
|
|
|
|
|
|
|
|
type cgconfig_t;
|
|
|
|
type cgconfig_exec_t;
|
|
|
|
init_daemon_domain(cgconfig_t, cgconfig_exec_t)
|
|
|
|
|
|
|
|
type cgconfig_initrc_exec_t;
|
|
|
|
init_script_file(cgconfig_initrc_exec_t)
|
|
|
|
|
|
|
|
type cgconfig_etc_t;
|
|
|
|
files_config_file(cgconfig_etc_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# cgclear local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow cgclear_t self:capability { dac_override dac_read_search sys_admin };
|
|
|
|
|
|
|
|
allow cgclear_t cgconfig_etc_t:file read_file_perms;
|
|
|
|
|
|
|
|
kernel_read_system_state(cgclear_t)
|
|
|
|
|
|
|
|
domain_setpriority_all_domains(cgclear_t)
|
|
|
|
|
|
|
|
fs_manage_cgroup_dirs(cgclear_t)
|
|
|
|
fs_manage_cgroup_files(cgclear_t)
|
|
|
|
fs_unmount_cgroup(cgclear_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# cgconfig local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow cgconfig_t self:capability { chown dac_override fowner fsetid sys_admin sys_tty_config };
|
|
|
|
|
|
|
|
allow cgconfig_t cgconfig_etc_t:file read_file_perms;
|
|
|
|
|
|
|
|
kernel_list_unlabeled(cgconfig_t)
|
|
|
|
kernel_read_system_state(cgconfig_t)
|
|
|
|
|
|
|
|
files_read_etc_files(cgconfig_t)
|
|
|
|
|
|
|
|
fs_manage_cgroup_dirs(cgconfig_t)
|
|
|
|
fs_manage_cgroup_files(cgconfig_t)
|
|
|
|
fs_mount_cgroup(cgconfig_t)
|
|
|
|
fs_mounton_cgroup(cgconfig_t)
|
|
|
|
fs_unmount_cgroup(cgconfig_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# cgred local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow cgred_t self:capability { chown dac_override fsetid net_admin sys_admin sys_ptrace };
|
|
|
|
allow cgred_t self:netlink_socket { write bind create read };
|
|
|
|
allow cgred_t self:unix_dgram_socket { write create connect };
|
|
|
|
|
|
|
|
allow cgred_t cgrules_etc_t:file read_file_perms;
|
|
|
|
|
|
|
|
allow cgred_t cgred_log_t:file { append_file_perms create_file_perms setattr_file_perms };
|
|
|
|
logging_log_filetrans(cgred_t, cgred_log_t, file)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
manage_files_pattern(cgred_t, cgred_runtime_t, cgred_runtime_t)
|
|
|
|
manage_sock_files_pattern(cgred_t, cgred_runtime_t, cgred_runtime_t)
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_filetrans(cgred_t, cgred_runtime_t, { file sock_file })
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
kernel_read_all_sysctls(cgred_t)
|
|
|
|
kernel_read_system_state(cgred_t)
|
|
|
|
|
|
|
|
domain_read_all_domains_state(cgred_t)
|
|
|
|
domain_setpriority_all_domains(cgred_t)
|
|
|
|
|
|
|
|
files_getattr_all_files(cgred_t)
|
|
|
|
files_getattr_all_sockets(cgred_t)
|
|
|
|
files_read_all_symlinks(cgred_t)
|
|
|
|
files_read_etc_files(cgred_t)
|
|
|
|
|
|
|
|
fs_write_cgroup_files(cgred_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(cgred_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(cgred_t)
|