aboutsummaryrefslogtreecommitdiff
blob: 29e465b0cf1d9dead2a721f95406408470504e40 (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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
policy_module(zarafa)

########################################
#
# Declarations
#

attribute zarafa_domain;
attribute zarafa_logfile;
attribute zarafa_pidfile;

zarafa_domain_template(deliver)

type zarafa_deliver_tmp_t;
files_tmp_file(zarafa_deliver_tmp_t)

type zarafa_etc_t;
files_config_file(zarafa_etc_t)

type zarafa_initrc_exec_t;
init_script_file(zarafa_initrc_exec_t)

zarafa_domain_template(gateway)
zarafa_domain_template(ical)
zarafa_domain_template(indexer)

type zarafa_indexer_tmp_t;
files_tmp_file(zarafa_indexer_tmp_t)

zarafa_domain_template(monitor)
zarafa_domain_template(server)

type zarafa_server_tmp_t;
files_tmp_file(zarafa_server_tmp_t)

type zarafa_share_t;
files_type(zarafa_share_t)

zarafa_domain_template(spooler)

type zarafa_var_lib_t;
files_tmp_file(zarafa_var_lib_t)

########################################
#
# Deliver local policy
#

manage_dirs_pattern(zarafa_deliver_t, zarafa_deliver_tmp_t, zarafa_deliver_tmp_t)
manage_files_pattern(zarafa_deliver_t, zarafa_deliver_tmp_t, zarafa_deliver_tmp_t)
files_tmp_filetrans(zarafa_deliver_t, zarafa_deliver_tmp_t, { file dir })

########################################
#
# Gateway local policy
#

corenet_all_recvfrom_netlabel(zarafa_gateway_t)
corenet_tcp_sendrecv_generic_if(zarafa_gateway_t)
corenet_tcp_sendrecv_generic_node(zarafa_gateway_t)
corenet_tcp_bind_generic_node(zarafa_gateway_t)

corenet_sendrecv_pop_server_packets(zarafa_gateway_t)
corenet_tcp_bind_pop_port(zarafa_gateway_t)

#######################################
#
# Ical local policy
#

corenet_all_recvfrom_netlabel(zarafa_ical_t)
corenet_tcp_sendrecv_generic_if(zarafa_ical_t)
corenet_tcp_sendrecv_generic_node(zarafa_ical_t)
corenet_tcp_bind_generic_node(zarafa_ical_t)

corenet_sendrecv_http_cache_client_packets(zarafa_ical_t)
corenet_tcp_bind_http_cache_port(zarafa_ical_t)

######################################
#
# Indexer local policy
#

manage_dirs_pattern(zarafa_indexer_t, zarafa_indexer_tmp_t, zarafa_indexer_tmp_t)
manage_files_pattern(zarafa_indexer_t, zarafa_indexer_tmp_t, zarafa_indexer_tmp_t)
files_tmp_filetrans(zarafa_indexer_t, zarafa_indexer_tmp_t, { file dir })

manage_dirs_pattern(zarafa_indexer_t, zarafa_var_lib_t, zarafa_var_lib_t)
manage_files_pattern(zarafa_indexer_t, zarafa_var_lib_t, zarafa_var_lib_t)
manage_lnk_files_pattern(zarafa_indexer_t, zarafa_var_lib_t, zarafa_var_lib_t)

########################################
#
# Server local policy
#

manage_dirs_pattern(zarafa_server_t, zarafa_server_tmp_t, zarafa_server_tmp_t)
manage_files_pattern(zarafa_server_t, zarafa_server_tmp_t, zarafa_server_tmp_t)
files_tmp_filetrans(zarafa_server_t, zarafa_server_tmp_t, { file dir })

manage_dirs_pattern(zarafa_server_t, zarafa_var_lib_t, zarafa_var_lib_t)
manage_files_pattern(zarafa_server_t, zarafa_var_lib_t, zarafa_var_lib_t)
manage_lnk_files_pattern(zarafa_server_t, zarafa_var_lib_t, zarafa_var_lib_t)
files_var_lib_filetrans(zarafa_server_t, zarafa_var_lib_t, { file dir lnk_file })

stream_connect_pattern(zarafa_server_t, zarafa_indexer_runtime_t, zarafa_indexer_runtime_t, zarafa_indexer_t)

corenet_all_recvfrom_netlabel(zarafa_server_t)
corenet_tcp_sendrecv_generic_if(zarafa_server_t)
corenet_tcp_sendrecv_generic_node(zarafa_server_t)
corenet_tcp_bind_generic_node(zarafa_server_t)

corenet_sendrecv_zarafa_server_packets(zarafa_server_t)
corenet_tcp_bind_zarafa_port(zarafa_server_t)

files_read_usr_files(zarafa_server_t)

logging_send_audit_msgs(zarafa_server_t)

optional_policy(`
	kerberos_use(zarafa_server_t)
')

optional_policy(`
	mysql_stream_connect(zarafa_server_t)
	mysql_tcp_connect(zarafa_server_t)
')

optional_policy(`
	postgresql_stream_connect(zarafa_server_t)
	postgresql_tcp_connect(zarafa_server_t)
')

########################################
#
# Spooler local policy
#

can_exec(zarafa_spooler_t, zarafa_spooler_exec_t)

corenet_all_recvfrom_netlabel(zarafa_spooler_t)
corenet_tcp_sendrecv_generic_if(zarafa_spooler_t)
corenet_tcp_sendrecv_generic_node(zarafa_spooler_t)

corenet_sendrecv_smtp_client_packets(zarafa_spooler_t)
corenet_tcp_connect_smtp_port(zarafa_spooler_t)

########################################
#
# Zarafa domain local policy
#

allow zarafa_domain self:capability { chown dac_override kill setgid setuid };
allow zarafa_domain self:process { setrlimit signal };
allow zarafa_domain self:fifo_file rw_fifo_file_perms;
allow zarafa_domain self:tcp_socket { accept listen };
allow zarafa_domain self:unix_stream_socket { accept listen };

stream_connect_pattern(zarafa_domain, zarafa_server_runtime_t, zarafa_server_runtime_t, zarafa_server_t)

read_files_pattern(zarafa_domain, zarafa_etc_t, zarafa_etc_t)

kernel_read_system_state(zarafa_domain)

dev_read_rand(zarafa_domain)
dev_read_urand(zarafa_domain)

logging_send_syslog_msg(zarafa_domain)

miscfiles_read_localization(zarafa_domain)