Chris PeBenito 29af4c
policy_module(tgtd, 1.1.0)
Matthew Ife 0bca40
Matthew Ife 0bca40
########################################
Matthew Ife 0bca40
#
Matthew Ife 0bca40
# TGTD personal declarations.
Matthew Ife 0bca40
#
Matthew Ife 0bca40
Matthew Ife 0bca40
type tgtd_t;
Matthew Ife 0bca40
type tgtd_exec_t;
Matthew Ife 0bca40
init_daemon_domain(tgtd_t, tgtd_exec_t)
Matthew Ife 0bca40
Matthew Ife 0bca40
type tgtd_initrc_exec_t;
Matthew Ife 0bca40
init_script_file(tgtd_initrc_exec_t)
Matthew Ife 0bca40
Matthew Ife 0bca40
type tgtd_tmp_t;
Matthew Ife 0bca40
files_tmp_file(tgtd_tmp_t)
Matthew Ife 0bca40
Matthew Ife 0bca40
type tgtd_tmpfs_t;
Matthew Ife 0bca40
files_tmpfs_file(tgtd_tmpfs_t)
Matthew Ife 0bca40
Matthew Ife 0bca40
type tgtd_var_lib_t;
Matthew Ife 0bca40
files_type(tgtd_var_lib_t)
Matthew Ife 0bca40
Matthew Ife 0bca40
########################################
Matthew Ife 0bca40
#
Matthew Ife 0bca40
# TGTD personal policy.
Matthew Ife 0bca40
#
Matthew Ife 0bca40
Matthew Ife 0bca40
allow tgtd_t self:capability sys_resource;
Matthew Ife 0bca40
allow tgtd_t self:process { setrlimit signal };
Matthew Ife 0bca40
allow tgtd_t self:fifo_file rw_fifo_file_perms;
Matthew Ife 0bca40
allow tgtd_t self:netlink_route_socket { create_socket_perms nlmsg_read };
Matthew Ife 0bca40
allow tgtd_t self:shm create_shm_perms;
Matthew Ife 0bca40
allow tgtd_t self:sem create_sem_perms;
Chris PeBenito 222d5b
allow tgtd_t self:tcp_socket create_stream_socket_perms;
Matthew Ife 0bca40
allow tgtd_t self:udp_socket create_socket_perms;
Matthew Ife 0bca40
allow tgtd_t self:unix_dgram_socket create_socket_perms;
Matthew Ife 0bca40
Matthew Ife 0bca40
manage_sock_files_pattern(tgtd_t, tgtd_tmp_t, tgtd_tmp_t)
Matthew Ife 0bca40
files_tmp_filetrans(tgtd_t, tgtd_tmp_t, { sock_file })
Matthew Ife 0bca40
Matthew Ife 0bca40
manage_files_pattern(tgtd_t, tgtd_tmpfs_t, tgtd_tmpfs_t)
Matthew Ife 0bca40
fs_tmpfs_filetrans(tgtd_t, tgtd_tmpfs_t, file)
Matthew Ife 0bca40
Matthew Ife 0bca40
manage_dirs_pattern(tgtd_t, tgtd_var_lib_t, tgtd_var_lib_t)
Matthew Ife 0bca40
manage_files_pattern(tgtd_t, tgtd_var_lib_t, tgtd_var_lib_t)
Matthew Ife 0bca40
files_var_lib_filetrans(tgtd_t, tgtd_var_lib_t, { dir file })
Matthew Ife 0bca40
Chris PeBenito 222d5b
kernel_read_fs_sysctls(tgtd_t)
Chris PeBenito 222d5b
Matthew Ife 0bca40
corenet_all_recvfrom_netlabel(tgtd_t)
Matthew Ife 0bca40
corenet_all_recvfrom_unlabeled(tgtd_t)
Matthew Ife 0bca40
corenet_tcp_sendrecv_generic_if(tgtd_t)
Matthew Ife 0bca40
corenet_tcp_sendrecv_generic_node(tgtd_t)
Matthew Ife 0bca40
corenet_tcp_sendrecv_iscsi_port(tgtd_t)
Chris PeBenito f27282
corenet_tcp_bind_generic_node(tgtd_t)
Chris PeBenito f27282
corenet_tcp_bind_iscsi_port(tgtd_t)
Chris PeBenito f27282
corenet_sendrecv_iscsi_server_packets(tgtd_t)
Matthew Ife 0bca40
Matthew Ife 0bca40
files_read_etc_files(tgtd_t)
Matthew Ife 0bca40
Chris PeBenito 30496b
storage_manage_fixed_disk(tgtd_t)
Matthew Ife 0bca40
Matthew Ife 0bca40
logging_send_syslog_msg(tgtd_t)
Matthew Ife 0bca40
Matthew Ife 0bca40
miscfiles_read_localization(tgtd_t)