1900668638
The latest revision of the labeled policy patches which enable both labeled and unlabeled policy support for NetLabel. This revision takes into account Chris' feedback from the first version and reduces the number of interface calls in each domain down to two at present: one for unlabeled access, one for NetLabel access. The older, transport layer specific interfaces, are still present for use by third-party modules but are not used in the default policy modules. trunk: Use netmsg initial SID for MLS-only Netlabel packets, from Paul Moore. This patch changes the policy to use the netmsg initial SID as the "base" SID/context for NetLabel packets which only have MLS security attributes. Currently we use the unlabeled initial SID which makes it very difficult to distinquish between actual unlabeled packets and those packets which have MLS security attributes.
83 lines
2.2 KiB
Plaintext
83 lines
2.2 KiB
Plaintext
|
|
policy_module(iscsid,1.1.1)
|
|
|
|
########################################
|
|
#
|
|
# 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)
|
|
|
|
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
|
|
#
|
|
|
|
allow iscsid_t self:capability { dac_override ipc_lock net_admin sys_nice sys_resource };
|
|
allow iscsid_t self:process setsched;
|
|
allow iscsid_t self:fifo_file { read write };
|
|
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;
|
|
allow iscsid_t self:netlink_route_socket rw_netlink_socket_perms;
|
|
allow iscsid_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow iscsid_t iscsi_lock_t:file manage_file_perms;
|
|
files_lock_filetrans(iscsid_t,iscsi_lock_t,file)
|
|
|
|
allow iscsid_t iscsi_tmp_t:dir manage_dir_perms;
|
|
allow iscsid_t iscsi_tmp_t:file manage_file_perms;
|
|
fs_tmpfs_filetrans(iscsid_t, iscsi_tmp_t, file )
|
|
|
|
allow iscsid_t iscsi_var_lib_t:dir list_dir_perms;
|
|
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)
|
|
files_search_var_lib(iscsid_t)
|
|
|
|
manage_files_pattern(iscsid_t,iscsi_var_run_t,iscsi_var_run_t)
|
|
files_pid_filetrans(iscsid_t,iscsi_var_run_t,file)
|
|
|
|
corenet_all_recvfrom_unlabeled(iscsid_t)
|
|
corenet_all_recvfrom_netlabel(iscsid_t)
|
|
corenet_tcp_sendrecv_all_if(iscsid_t)
|
|
corenet_tcp_sendrecv_all_nodes(iscsid_t)
|
|
corenet_tcp_sendrecv_all_ports(iscsid_t)
|
|
corenet_tcp_connect_http_port(iscsid_t)
|
|
corenet_tcp_connect_iscsi_port(iscsid_t)
|
|
|
|
dev_rw_sysfs(iscsid_t)
|
|
|
|
domain_use_interactive_fds(iscsid_t)
|
|
|
|
files_read_etc_files(iscsid_t)
|
|
|
|
libs_use_ld_so(iscsid_t)
|
|
libs_use_shared_libs(iscsid_t)
|
|
|
|
logging_send_syslog_msg(iscsid_t)
|
|
|
|
miscfiles_read_localization(iscsid_t)
|
|
|
|
sysnet_dns_name_resolve(iscsid_t)
|
|
|
|
ifdef(`targeted_policy',`
|
|
term_use_generic_ptys(iscsid_t)
|
|
')
|