2006-10-31 21:01:48 +00:00
|
|
|
|
2010-03-09 20:17:16 +00:00
|
|
|
policy_module(iscsi, 1.6.2)
|
2006-10-31 21:01:48 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type iscsid_t;
|
|
|
|
type iscsid_exec_t;
|
|
|
|
domain_type(iscsid_t)
|
|
|
|
init_daemon_domain(iscsid_t, iscsid_exec_t)
|
|
|
|
|
|
|
|
type iscsi_lock_t;
|
|
|
|
files_lock_file(iscsi_lock_t)
|
|
|
|
|
2010-03-09 20:17:16 +00:00
|
|
|
type iscsi_log_t;
|
|
|
|
logging_log_file(iscsi_log_t)
|
|
|
|
|
2006-10-31 21:01:48 +00:00
|
|
|
type iscsi_tmp_t;
|
|
|
|
files_tmp_file(iscsi_tmp_t)
|
|
|
|
|
|
|
|
type iscsi_var_lib_t;
|
|
|
|
files_type(iscsi_var_lib_t)
|
|
|
|
|
|
|
|
type iscsi_var_run_t;
|
|
|
|
files_pid_file(iscsi_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# iscsid local policy
|
|
|
|
#
|
|
|
|
|
2009-03-20 13:58:15 +00:00
|
|
|
allow iscsid_t self:capability { dac_override ipc_lock net_admin net_raw sys_admin sys_nice sys_resource };
|
2008-08-11 14:03:36 +00:00
|
|
|
allow iscsid_t self:process { setrlimit setsched signal };
|
2008-10-16 16:09:20 +00:00
|
|
|
allow iscsid_t self:fifo_file rw_fifo_file_perms;
|
2006-10-31 21:01:48 +00:00
|
|
|
allow iscsid_t self:unix_stream_socket { create_stream_socket_perms connectto };
|
|
|
|
allow iscsid_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow iscsid_t self:sem create_sem_perms;
|
|
|
|
allow iscsid_t self:shm create_shm_perms;
|
|
|
|
allow iscsid_t self:netlink_socket create_socket_perms;
|
2010-03-09 20:17:16 +00:00
|
|
|
allow iscsid_t self:netlink_kobject_uevent_socket create_socket_perms;
|
2006-10-31 21:01:48 +00:00
|
|
|
allow iscsid_t self:netlink_route_socket rw_netlink_socket_perms;
|
|
|
|
allow iscsid_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
|
2010-03-09 20:17:16 +00:00
|
|
|
can_exec(iscsid_t, iscsid_exec_t)
|
|
|
|
|
2009-03-20 13:58:15 +00:00
|
|
|
manage_files_pattern(iscsid_t, iscsi_lock_t, iscsi_lock_t)
|
|
|
|
files_lock_filetrans(iscsid_t, iscsi_lock_t, file)
|
2006-10-31 21:01:48 +00:00
|
|
|
|
2010-03-09 20:17:16 +00:00
|
|
|
manage_files_pattern(iscsid_t, iscsi_log_t, iscsi_log_t)
|
|
|
|
logging_log_filetrans(iscsid_t, iscsi_log_t, file)
|
|
|
|
|
|
|
|
manage_dirs_pattern(iscsid_t, iscsi_tmp_t, iscsi_tmp_t)
|
|
|
|
manage_files_pattern(iscsid_t, iscsi_tmp_t, iscsi_tmp_t)
|
|
|
|
fs_tmpfs_filetrans(iscsid_t, iscsi_tmp_t, { dir file } )
|
2006-10-31 21:01:48 +00:00
|
|
|
|
|
|
|
allow iscsid_t iscsi_var_lib_t:dir list_dir_perms;
|
2009-06-26 14:40:13 +00:00
|
|
|
read_files_pattern(iscsid_t, iscsi_var_lib_t, iscsi_var_lib_t)
|
|
|
|
read_lnk_files_pattern(iscsid_t, iscsi_var_lib_t, iscsi_var_lib_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
files_search_var_lib(iscsid_t)
|
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
manage_files_pattern(iscsid_t, iscsi_var_run_t, iscsi_var_run_t)
|
|
|
|
files_pid_filetrans(iscsid_t, iscsi_var_run_t, file)
|
2006-10-31 21:01:48 +00:00
|
|
|
|
2010-03-09 20:17:16 +00:00
|
|
|
kernel_read_network_state(iscsid_t)
|
2007-11-05 19:35:08 +00:00
|
|
|
kernel_read_system_state(iscsid_t)
|
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(iscsid_t)
|
|
|
|
corenet_all_recvfrom_netlabel(iscsid_t)
|
2009-01-06 20:24:10 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(iscsid_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(iscsid_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(iscsid_t)
|
|
|
|
corenet_tcp_connect_http_port(iscsid_t)
|
|
|
|
corenet_tcp_connect_iscsi_port(iscsid_t)
|
2008-08-11 14:03:36 +00:00
|
|
|
corenet_tcp_connect_isns_port(iscsid_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
|
|
|
|
dev_rw_sysfs(iscsid_t)
|
2010-03-09 20:17:16 +00:00
|
|
|
dev_rw_userio_dev(iscsid_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
|
|
|
|
domain_use_interactive_fds(iscsid_t)
|
2010-03-09 20:17:16 +00:00
|
|
|
domain_dontaudit_read_all_domains_state(iscsid_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
|
|
|
|
files_read_etc_files(iscsid_t)
|
|
|
|
|
2009-11-24 16:08:22 +00:00
|
|
|
auth_use_nsswitch(iscsid_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
|
2010-03-09 20:17:16 +00:00
|
|
|
init_stream_connect_script(iscsid_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(iscsid_t)
|
|
|
|
|
2009-11-24 16:08:22 +00:00
|
|
|
miscfiles_read_localization(iscsid_t)
|
2010-03-09 20:17:16 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
tgtd_rw_semaphores(iscsid_t)
|
|
|
|
')
|