2016-02-11 11:03:06 +00:00
|
|
|
policy_module(ceph, 1.1.1)
|
2015-05-15 13:18:05 +00:00
|
|
|
|
2015-07-28 09:11:42 +00:00
|
|
|
require {
|
|
|
|
type sysfs_t;
|
2018-11-05 19:05:19 +00:00
|
|
|
type configfs_t;
|
|
|
|
type commplex_main_port_t;
|
|
|
|
type rpm_exec_t;
|
|
|
|
type rpm_var_lib_t;
|
|
|
|
type kernel_t;
|
2015-07-28 09:11:42 +00:00
|
|
|
type var_run_t;
|
|
|
|
type random_device_t;
|
2015-08-10 15:07:32 +00:00
|
|
|
type urandom_device_t;
|
2017-06-09 12:38:28 +00:00
|
|
|
type setfiles_t;
|
|
|
|
type nvme_device_t;
|
2015-07-28 09:11:42 +00:00
|
|
|
class sock_file unlink;
|
2018-11-05 19:05:19 +00:00
|
|
|
class tcp_socket name_connect_t;
|
|
|
|
class lnk_file { create getattr read unlink };
|
|
|
|
class dir { add_name create getattr open read remove_name rmdir search write };
|
|
|
|
class file { create getattr open read rename unlink write };
|
2017-06-09 12:38:28 +00:00
|
|
|
class blk_file { getattr ioctl open read write };
|
2018-04-11 13:25:59 +00:00
|
|
|
class capability2 block_suspend;
|
2015-07-28 09:11:42 +00:00
|
|
|
}
|
|
|
|
|
2015-05-15 13:18:05 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type ceph_t;
|
|
|
|
type ceph_exec_t;
|
|
|
|
init_daemon_domain(ceph_t, ceph_exec_t)
|
|
|
|
|
|
|
|
permissive ceph_t;
|
|
|
|
|
|
|
|
type ceph_initrc_exec_t;
|
|
|
|
init_script_file(ceph_initrc_exec_t)
|
|
|
|
|
|
|
|
type ceph_log_t;
|
|
|
|
logging_log_file(ceph_log_t)
|
|
|
|
|
|
|
|
type ceph_var_lib_t;
|
|
|
|
files_type(ceph_var_lib_t)
|
|
|
|
|
|
|
|
type ceph_var_run_t;
|
|
|
|
files_pid_file(ceph_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# ceph local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow ceph_t self:process { signal_perms };
|
|
|
|
allow ceph_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
allow ceph_t self:unix_stream_socket create_stream_socket_perms;
|
2016-03-01 08:03:05 +00:00
|
|
|
allow ceph_t self:capability { setuid setgid dac_override };
|
2018-04-11 13:25:59 +00:00
|
|
|
allow ceph_t self:capability2 block_suspend;
|
2015-05-15 13:18:05 +00:00
|
|
|
|
|
|
|
manage_dirs_pattern(ceph_t, ceph_log_t, ceph_log_t)
|
|
|
|
manage_files_pattern(ceph_t, ceph_log_t, ceph_log_t)
|
|
|
|
manage_lnk_files_pattern(ceph_t, ceph_log_t, ceph_log_t)
|
|
|
|
|
|
|
|
manage_dirs_pattern(ceph_t, ceph_var_lib_t, ceph_var_lib_t)
|
|
|
|
manage_files_pattern(ceph_t, ceph_var_lib_t, ceph_var_lib_t)
|
|
|
|
manage_lnk_files_pattern(ceph_t, ceph_var_lib_t, ceph_var_lib_t)
|
|
|
|
|
|
|
|
manage_dirs_pattern(ceph_t, ceph_var_run_t, ceph_var_run_t)
|
|
|
|
manage_files_pattern(ceph_t, ceph_var_run_t, ceph_var_run_t)
|
|
|
|
manage_lnk_files_pattern(ceph_t, ceph_var_run_t, ceph_var_run_t)
|
|
|
|
|
|
|
|
kernel_read_system_state(ceph_t)
|
2017-03-13 16:51:45 +00:00
|
|
|
kernel_read_network_state(ceph_t)
|
2018-11-05 19:05:19 +00:00
|
|
|
allow ceph_t kernel_t:system module_request;
|
2015-05-15 13:18:05 +00:00
|
|
|
|
|
|
|
corenet_all_recvfrom_unlabeled(ceph_t)
|
|
|
|
corenet_all_recvfrom_netlabel(ceph_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(ceph_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(ceph_t)
|
|
|
|
corenet_udp_bind_generic_node(ceph_t)
|
|
|
|
corenet_tcp_bind_generic_node(ceph_t)
|
|
|
|
|
|
|
|
corenet_sendrecv_cyphesis_server_packets(ceph_t)
|
|
|
|
corenet_tcp_bind_cyphesis_port(ceph_t)
|
|
|
|
corenet_tcp_sendrecv_cyphesis_port(ceph_t)
|
|
|
|
|
2018-11-05 19:05:19 +00:00
|
|
|
allow ceph_t commplex_main_port_t:tcp_socket name_connect;
|
|
|
|
|
2015-05-15 13:18:05 +00:00
|
|
|
corecmd_exec_bin(ceph_t)
|
|
|
|
corecmd_exec_shell(ceph_t)
|
|
|
|
|
2018-11-05 19:05:19 +00:00
|
|
|
allow ceph_t rpm_exec_t:file getattr;
|
|
|
|
allow ceph_t rpm_var_lib_t:dir { add_name write };
|
|
|
|
allow ceph_t rpm_var_lib_t:file { create open };
|
|
|
|
|
2015-05-15 13:18:05 +00:00
|
|
|
dev_read_urand(ceph_t)
|
|
|
|
|
2016-07-19 03:34:49 +00:00
|
|
|
domain_read_all_domains_state(ceph_t)
|
|
|
|
|
2015-05-15 13:18:05 +00:00
|
|
|
fs_getattr_all_fs(ceph_t)
|
|
|
|
|
|
|
|
auth_use_nsswitch(ceph_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(ceph_t)
|
|
|
|
|
|
|
|
sysnet_dns_name_resolve(ceph_t)
|
2015-06-17 11:08:17 +00:00
|
|
|
|
2017-06-09 12:38:28 +00:00
|
|
|
allow ceph_t nvme_device_t:blk_file { getattr ioctl open read write };
|
|
|
|
|
2015-08-10 15:07:32 +00:00
|
|
|
# basis for future security review
|
2016-06-13 10:34:39 +00:00
|
|
|
allow ceph_t ceph_var_run_t:sock_file { create unlink write setattr };
|
|
|
|
allow ceph_t self:capability { sys_rawio chown };
|
2015-06-17 11:08:17 +00:00
|
|
|
|
|
|
|
allow ceph_t self:tcp_socket { accept listen };
|
|
|
|
corenet_tcp_connect_cyphesis_port(ceph_t)
|
|
|
|
corenet_tcp_connect_generic_port(ceph_t)
|
|
|
|
files_list_tmp(ceph_t)
|
2016-09-29 10:08:39 +00:00
|
|
|
files_manage_generic_tmp_files(ceph_t)
|
2015-06-17 11:08:17 +00:00
|
|
|
fstools_exec(ceph_t)
|
|
|
|
nis_use_ypbind_uncond(ceph_t)
|
|
|
|
storage_raw_rw_fixed_disk(ceph_t)
|
2016-03-08 09:59:33 +00:00
|
|
|
files_manage_generic_locks(ceph_t)
|
2018-01-25 15:31:30 +00:00
|
|
|
libs_exec_ldconfig(ceph_t)
|
2015-07-28 09:11:42 +00:00
|
|
|
|
|
|
|
allow ceph_t sysfs_t:dir read;
|
|
|
|
allow ceph_t sysfs_t:file { read getattr open };
|
2017-09-21 15:24:07 +00:00
|
|
|
allow ceph_t sysfs_t:lnk_file { read getattr };
|
2015-07-28 09:11:42 +00:00
|
|
|
|
2018-11-05 19:05:19 +00:00
|
|
|
allow ceph_t configfs_t:dir { add_name create getattr open read remove_name rmdir search write };
|
|
|
|
allow ceph_t configfs_t:file { getattr open read write };
|
|
|
|
allow ceph_t configfs_t:lnk_file { create getattr read unlink };
|
|
|
|
|
|
|
|
|
2015-07-28 09:11:42 +00:00
|
|
|
allow ceph_t random_device_t:chr_file getattr;
|
2015-08-10 15:07:32 +00:00
|
|
|
allow ceph_t urandom_device_t:chr_file getattr;
|
2015-07-28 09:11:42 +00:00
|
|
|
allow ceph_t self:process setpgid;
|
|
|
|
allow ceph_t var_run_t:dir { write create add_name };
|
2017-06-06 19:27:54 +00:00
|
|
|
allow ceph_t var_run_t:file { read write create open getattr };
|
2015-07-28 09:11:42 +00:00
|
|
|
|
|
|
|
fsadm_manage_pid(ceph_t)
|
|
|
|
|
|
|
|
#============= setfiles_t ==============
|
|
|
|
allow setfiles_t ceph_var_lib_t:file write;
|