|
Chris PeBenito |
fa45da |
|
|
Chris PeBenito |
12e9ea |
policy_module(ccs,1.2.1)
|
|
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 |
9af48e |
# conf files
|
|
Chris PeBenito |
fa45da |
type cluster_conf_t;
|
|
Chris PeBenito |
fa45da |
files_type(cluster_conf_t)
|
|
Chris PeBenito |
fa45da |
|
|
Chris PeBenito |
9af48e |
# tmp files
|
|
Chris PeBenito |
9af48e |
type ccs_tmp_t;
|
|
Chris PeBenito |
9af48e |
files_tmp_file(ccs_tmp_t)
|
|
Chris PeBenito |
9af48e |
|
|
Chris PeBenito |
fa45da |
# log files
|
|
Chris PeBenito |
fa45da |
type ccs_var_log_t;
|
|
Chris PeBenito |
fa45da |
logging_log_file(ccs_var_log_t)
|
|
Chris PeBenito |
fa45da |
|
|
Chris PeBenito |
6b19be |
# var lib files
|
|
Chris PeBenito |
6b19be |
type ccs_var_lib_t;
|
|
Chris PeBenito |
6b19be |
logging_log_file(ccs_var_lib_t)
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
fa45da |
# pid files
|
|
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 |
6b19be |
allow ccs_t self:capability { 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 |
fa45da |
allow ccs_t self:fifo_file { read write };
|
|
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 |
c0868a |
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 |
9af48e |
manage_dirs_pattern(ccs_t,ccs_tmp_t,ccs_tmp_t)
|
|
Chris PeBenito |
9af48e |
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 |
fa45da |
# log files
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(ccs_t,ccs_var_log_t,ccs_var_log_t)
|
|
Chris PeBenito |
c0868a |
manage_sock_files_pattern(ccs_t,ccs_var_log_t,ccs_var_log_t)
|
|
Chris PeBenito |
c0868a |
allow ccs_t ccs_var_log_t:dir setattr;
|
|
Chris PeBenito |
fa45da |
logging_log_filetrans(ccs_t,ccs_var_log_t,{ sock_file file dir })
|
|
Chris PeBenito |
fa45da |
|
|
Chris PeBenito |
6b19be |
# var lib files
|
|
Chris PeBenito |
6b19be |
manage_dirs_pattern(ccs_t,ccs_var_lib_t,ccs_var_lib_t)
|
|
Chris PeBenito |
6b19be |
manage_files_pattern(ccs_t,ccs_var_lib_t,ccs_var_lib_t)
|
|
Chris PeBenito |
6b19be |
files_var_lib_filetrans(ccs_t,ccs_var_lib_t,{ file dir })
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
fa45da |
# pid file
|
|
Chris PeBenito |
c0868a |
manage_dirs_pattern(ccs_t,ccs_var_run_t,ccs_var_run_t)
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(ccs_t,ccs_var_run_t,ccs_var_run_t)
|
|
Chris PeBenito |
c0868a |
manage_sock_files_pattern(ccs_t,ccs_var_run_t,ccs_var_run_t)
|
|
Chris PeBenito |
fa45da |
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 |
fa45da |
corenet_tcp_sendrecv_all_if(ccs_t)
|
|
Chris PeBenito |
fa45da |
corenet_udp_sendrecv_all_if(ccs_t)
|
|
Chris PeBenito |
fa45da |
corenet_tcp_sendrecv_all_nodes(ccs_t)
|
|
Chris PeBenito |
fa45da |
corenet_udp_sendrecv_all_nodes(ccs_t)
|
|
Chris PeBenito |
fa45da |
corenet_tcp_sendrecv_all_ports(ccs_t)
|
|
Chris PeBenito |
fa45da |
corenet_udp_sendrecv_all_ports(ccs_t)
|
|
Chris PeBenito |
fa45da |
corenet_tcp_bind_all_nodes(ccs_t)
|
|
Chris PeBenito |
fa45da |
corenet_udp_bind_all_nodes(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 |
libs_use_ld_so(ccs_t)
|
|
Chris PeBenito |
fa45da |
libs_use_shared_libs(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 |
6b19be |
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(`
|
|
Chris PeBenito |
fa45da |
unconfined_use_fds(ccs_t)
|
|
Chris PeBenito |
fa45da |
')
|