aboutsummaryrefslogtreecommitdiff
blob: 8bcfa2fe83ad2a027bffe6f47e2d2224454ae7a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
policy_module(iscsi, 1.8.0)

########################################
#
# 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_log_t;
logging_log_file(iscsi_log_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 net_raw sys_admin sys_nice sys_resource };
dontaudit iscsid_t self:capability sys_ptrace;
allow iscsid_t self:process { setrlimit setsched signal };
allow iscsid_t self:fifo_file rw_fifo_file_perms;
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_kobject_uevent_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;

can_exec(iscsid_t, iscsid_exec_t)

manage_dirs_pattern(iscsid_t, iscsi_lock_t, iscsi_lock_t)
manage_files_pattern(iscsid_t, iscsi_lock_t, iscsi_lock_t)
files_lock_filetrans(iscsid_t, iscsi_lock_t, { dir file })

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 } )

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)

kernel_read_network_state(iscsid_t)
kernel_read_system_state(iscsid_t)

corenet_all_recvfrom_unlabeled(iscsid_t)
corenet_all_recvfrom_netlabel(iscsid_t)
corenet_tcp_sendrecv_generic_if(iscsid_t)
corenet_tcp_sendrecv_generic_node(iscsid_t)
corenet_tcp_sendrecv_all_ports(iscsid_t)
corenet_tcp_connect_http_port(iscsid_t)
corenet_tcp_connect_iscsi_port(iscsid_t)
corenet_tcp_connect_isns_port(iscsid_t)

dev_rw_sysfs(iscsid_t)
dev_rw_userio_dev(iscsid_t)

domain_use_interactive_fds(iscsid_t)
domain_dontaudit_read_all_domains_state(iscsid_t)

files_read_etc_files(iscsid_t)

auth_use_nsswitch(iscsid_t)

init_stream_connect_script(iscsid_t)

logging_send_syslog_msg(iscsid_t)

miscfiles_read_localization(iscsid_t)

optional_policy(`
	tgtd_manage_semaphores(iscsid_t)
')