Chris PeBenito 29af4c
policy_module(ccs, 1.5.0)
Chris PeBenito fa45da
Chris PeBenito fa45da
########################################
Chris PeBenito fa45da
#
Chris PeBenito fa45da
# Declarations
Chris PeBenito fa45da
#
Chris PeBenito fa45da
Chris PeBenito fa45da
type ccs_t;
Chris PeBenito fa45da
type ccs_exec_t;
Chris PeBenito fa45da
init_daemon_domain(ccs_t, ccs_exec_t)
Chris PeBenito fa45da
Chris PeBenito fa45da
type cluster_conf_t;
Chris PeBenito fa45da
files_type(cluster_conf_t)
Chris PeBenito fa45da
Chris PeBenito 9af48e
type ccs_tmp_t;
Chris PeBenito 9af48e
files_tmp_file(ccs_tmp_t)
Chris PeBenito 9af48e
Chris PeBenito 3fb2b7
type ccs_tmpfs_t;
Chris PeBenito 3fb2b7
files_tmpfs_file(ccs_tmpfs_t)
Chris PeBenito fa45da
Chris PeBenito 6b19be
type ccs_var_lib_t;
Chris PeBenito 6b19be
logging_log_file(ccs_var_lib_t)
Chris PeBenito 6b19be
Chris PeBenito 3fb2b7
type ccs_var_log_t;
Chris PeBenito 3fb2b7
logging_log_file(ccs_var_log_t)
Chris PeBenito 3fb2b7
Chris PeBenito fa45da
type ccs_var_run_t;
Chris PeBenito fa45da
files_pid_file(ccs_var_run_t)
Chris PeBenito fa45da
Chris PeBenito fa45da
########################################
Chris PeBenito fa45da
#
Chris PeBenito fa45da
# ccs local policy
Chris PeBenito fa45da
#
Chris PeBenito fa45da
Chris PeBenito 3fb2b7
allow ccs_t self:capability { ipc_owner ipc_lock sys_nice sys_resource sys_admin };
Chris PeBenito fa45da
allow ccs_t self:process { signal setrlimit setsched };
Chris PeBenito 7aefc6
dontaudit ccs_t self:process ptrace;
Chris PeBenito 0b36a2
allow ccs_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito fa45da
allow ccs_t self:unix_stream_socket { connectto create_stream_socket_perms };
Chris PeBenito fa45da
allow ccs_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito fa45da
allow ccs_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito fa45da
allow ccs_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito fa45da
allow ccs_t self:udp_socket { create_socket_perms listen recv_msg send_msg };
Chris PeBenito fa45da
# cjp: this needs to be fixed to be specific
Chris PeBenito fa45da
allow ccs_t self:socket create_socket_perms;
Chris PeBenito fa45da
Chris PeBenito 0bfccd
manage_files_pattern(ccs_t, cluster_conf_t, cluster_conf_t)
Chris PeBenito fa45da
Chris PeBenito 9af48e
# tmp file
Chris PeBenito 9af48e
allow ccs_t ccs_tmp_t:dir manage_dir_perms;
Chris PeBenito 0bfccd
manage_dirs_pattern(ccs_t, ccs_tmp_t, ccs_tmp_t)
Chris PeBenito 0bfccd
manage_files_pattern(ccs_t, ccs_tmp_t, ccs_tmp_t)
Chris PeBenito 9af48e
files_tmp_filetrans(ccs_t, ccs_tmp_t, { file dir })
Chris PeBenito 9af48e
Chris PeBenito 3fb2b7
manage_dirs_pattern(ccs_t, ccs_tmpfs_t, ccs_tmpfs_t)
Chris PeBenito 3fb2b7
manage_files_pattern(ccs_t, ccs_tmpfs_t, ccs_tmpfs_t)
Chris PeBenito 3fb2b7
fs_tmpfs_filetrans(ccs_t, ccs_tmpfs_t, { dir file })
Chris PeBenito fa45da
Chris PeBenito 6b19be
# var lib files
Chris PeBenito 0bfccd
manage_dirs_pattern(ccs_t, ccs_var_lib_t, ccs_var_lib_t)
Chris PeBenito 0bfccd
manage_files_pattern(ccs_t, ccs_var_lib_t, ccs_var_lib_t)
Chris PeBenito 0bfccd
files_var_lib_filetrans(ccs_t, ccs_var_lib_t, { file dir })
Chris PeBenito 6b19be
Dominick Grift 1dfc76
allow ccs_t ccs_var_log_t:dir setattr_dir_perms;
Chris PeBenito 3fb2b7
manage_files_pattern(ccs_t, ccs_var_log_t, ccs_var_log_t)
Chris PeBenito 3fb2b7
manage_sock_files_pattern(ccs_t, ccs_var_log_t, ccs_var_log_t)
Chris PeBenito 3fb2b7
logging_log_filetrans(ccs_t, ccs_var_log_t, { sock_file file dir })
Chris PeBenito 3fb2b7
Chris PeBenito fa45da
# pid file
Chris PeBenito 0bfccd
manage_dirs_pattern(ccs_t, ccs_var_run_t, ccs_var_run_t)
Chris PeBenito 0bfccd
manage_files_pattern(ccs_t, ccs_var_run_t, ccs_var_run_t)
Chris PeBenito 0bfccd
manage_sock_files_pattern(ccs_t, ccs_var_run_t, ccs_var_run_t)
Chris PeBenito 0bfccd
files_pid_filetrans(ccs_t, ccs_var_run_t, { dir file sock_file })
Chris PeBenito fa45da
Chris PeBenito fa45da
kernel_read_kernel_sysctls(ccs_t)
Chris PeBenito fa45da
Chris PeBenito 8021cb
corecmd_list_bin(ccs_t)
Chris PeBenito fa45da
corecmd_exec_bin(ccs_t)
Chris PeBenito fa45da
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(ccs_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(ccs_t)
Chris PeBenito 668b30
corenet_tcp_sendrecv_generic_if(ccs_t)
Chris PeBenito 668b30
corenet_udp_sendrecv_generic_if(ccs_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(ccs_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(ccs_t)
Chris PeBenito fa45da
corenet_tcp_sendrecv_all_ports(ccs_t)
Chris PeBenito fa45da
corenet_udp_sendrecv_all_ports(ccs_t)
Chris PeBenito c12621
corenet_tcp_bind_generic_node(ccs_t)
Chris PeBenito c12621
corenet_udp_bind_generic_node(ccs_t)
Chris PeBenito fa45da
corenet_tcp_bind_cluster_port(ccs_t)
Chris PeBenito fa45da
corenet_udp_bind_cluster_port(ccs_t)
Chris PeBenito fa45da
corenet_udp_bind_netsupport_port(ccs_t)
Chris PeBenito fa45da
Chris PeBenito fa45da
dev_read_urand(ccs_t)
Chris PeBenito fa45da
Chris PeBenito fa45da
files_read_etc_files(ccs_t)
Chris PeBenito fa45da
files_read_etc_runtime_files(ccs_t)
Chris PeBenito fa45da
Chris PeBenito fa45da
init_rw_script_tmp_files(ccs_t)
Chris PeBenito fa45da
Chris PeBenito fa45da
logging_send_syslog_msg(ccs_t)
Chris PeBenito fa45da
Chris PeBenito fa45da
miscfiles_read_localization(ccs_t)
Chris PeBenito fa45da
Chris PeBenito fa45da
sysnet_dns_name_resolve(ccs_t)
Chris PeBenito fa45da
Chris PeBenito 3fb2b7
userdom_manage_unpriv_user_shared_mem(ccs_t)
Chris PeBenito 3fb2b7
userdom_manage_unpriv_user_semaphores(ccs_t)
Chris PeBenito 3fb2b7
Dominick Grift 68ac47
ifdef(`hide_broken_symptoms',`
Chris PeBenito 8021cb
	corecmd_dontaudit_write_bin_dirs(ccs_t)
Chris PeBenito 6b19be
	files_manage_isid_type_files(ccs_t)
Chris PeBenito 6b19be
')
Chris PeBenito 6b19be
Chris PeBenito fa45da
optional_policy(`
Jeremy Solt 538cf9
	aisexec_stream_connect(ccs_t)
Jeremy Solt 538cf9
	corosync_stream_connect(ccs_t)
Jeremy Solt 538cf9
')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
optional_policy(`
Dan Walsh 3eaa99
	qpidd_rw_semaphores(ccs_t)
Dan Walsh 3eaa99
	qpidd_rw_shm(ccs_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Chris PeBenito fa45da
	unconfined_use_fds(ccs_t)
Chris PeBenito fa45da
')