aboutsummaryrefslogtreecommitdiff
blob: 2329f8e39d8380dc63c88d8e12d7b857cadb6779 (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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
policy_module(rgmanager, 1.7.0)

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

## <desc>
##	<p>
##	Determine whether rgmanager can
##	connect to the network using TCP.
##	</p>
## </desc>
gen_tunable(rgmanager_can_network_connect, false)

type rgmanager_t;
type rgmanager_exec_t;
init_daemon_domain(rgmanager_t, rgmanager_exec_t)

type rgmanager_initrc_exec_t;
init_script_file(rgmanager_initrc_exec_t)

type rgmanager_tmp_t;
files_tmp_file(rgmanager_tmp_t)

type rgmanager_tmpfs_t;
files_tmpfs_file(rgmanager_tmpfs_t)

type rgmanager_var_log_t;
logging_log_file(rgmanager_var_log_t)

type rgmanager_var_run_t;
files_pid_file(rgmanager_var_run_t)

########################################
#
# Local policy
#

allow rgmanager_t self:capability { dac_override ipc_lock net_raw sys_admin sys_nice sys_resource };
allow rgmanager_t self:process { setsched signal };
allow rgmanager_t self:fifo_file rw_fifo_file_perms;
allow rgmanager_t self:unix_stream_socket { accept listen };
allow rgmanager_t self:tcp_socket { accept listen };

manage_dirs_pattern(rgmanager_t, rgmanager_tmp_t, rgmanager_tmp_t)
manage_files_pattern(rgmanager_t, rgmanager_tmp_t, rgmanager_tmp_t)
files_tmp_filetrans(rgmanager_t, rgmanager_tmp_t, { file dir })

manage_dirs_pattern(rgmanager_t, rgmanager_tmpfs_t, rgmanager_tmpfs_t)
manage_files_pattern(rgmanager_t, rgmanager_tmpfs_t, rgmanager_tmpfs_t)
fs_tmpfs_filetrans(rgmanager_t, rgmanager_tmpfs_t, { dir file })

allow rgmanager_t rgmanager_var_log_t:file { append_file_perms create_file_perms setattr_file_perms };
logging_log_filetrans(rgmanager_t, rgmanager_var_log_t, file)

manage_files_pattern(rgmanager_t, rgmanager_var_run_t, rgmanager_var_run_t)
manage_sock_files_pattern(rgmanager_t, rgmanager_var_run_t, rgmanager_var_run_t)
files_pid_filetrans(rgmanager_t, rgmanager_var_run_t, { file sock_file })

kernel_read_kernel_sysctls(rgmanager_t)
kernel_read_system_state(rgmanager_t)
kernel_rw_rpc_sysctls(rgmanager_t)
kernel_search_debugfs(rgmanager_t)
kernel_search_network_state(rgmanager_t)
kernel_manage_unlabeled_dirs(rgmanager_t)

corenet_all_recvfrom_unlabeled(rgmanager_t)
corenet_all_recvfrom_netlabel(rgmanager_t)
corenet_tcp_sendrecv_generic_if(rgmanager_t)
corenet_tcp_sendrecv_generic_node(rgmanager_t)

corecmd_exec_bin(rgmanager_t)
corecmd_exec_shell(rgmanager_t)

dev_rw_dlm_control(rgmanager_t)
dev_setattr_dlm_control(rgmanager_t)
dev_search_sysfs(rgmanager_t)

domain_read_all_domains_state(rgmanager_t)
domain_getattr_all_domains(rgmanager_t)
domain_dontaudit_ptrace_all_domains(rgmanager_t)

files_list_all(rgmanager_t)
files_getattr_all_symlinks(rgmanager_t)
files_manage_mnt_dirs(rgmanager_t)
files_read_non_security_files(rgmanager_t)

fs_getattr_all_fs(rgmanager_t)

storage_raw_read_fixed_disk(rgmanager_t)

term_getattr_pty_fs(rgmanager_t)

auth_dontaudit_getattr_shadow(rgmanager_t)
auth_use_nsswitch(rgmanager_t)

init_domtrans_script(rgmanager_t)

logging_send_syslog_msg(rgmanager_t)

miscfiles_read_localization(rgmanager_t)

tunable_policy(`rgmanager_can_network_connect',`
	corenet_sendrecv_all_client_packets(rgmanager_t)
	corenet_tcp_connect_all_ports(rgmanager_t)
	corenet_tcp_sendrecv_all_ports(rgmanager_t)
')

optional_policy(`
	aisexec_stream_connect(rgmanager_t)
')

optional_policy(`
	consoletype_exec(rgmanager_t)
')

optional_policy(`
	corosync_stream_connect(rgmanager_t)
')

optional_policy(`
	apache_domtrans(rgmanager_t)
	apache_signal(rgmanager_t)
')

optional_policy(`
	fstools_domtrans(rgmanager_t)
')

optional_policy(`
	rhcs_stream_connect_groupd(rgmanager_t)
	rhcs_stream_connect_gfs_controld(rgmanager_t)
')

optional_policy(`
	hostname_exec(rgmanager_t)
')

optional_policy(`
	ccs_manage_config(rgmanager_t)
	ccs_stream_connect(rgmanager_t)
')

optional_policy(`
	lvm_domtrans(rgmanager_t)
')

optional_policy(`
	mount_domtrans(rgmanager_t)
')

optional_policy(`
	mysql_domtrans_mysql_safe(rgmanager_t)
	mysql_stream_connect(rgmanager_t)
')

optional_policy(`
	netutils_domtrans(rgmanager_t)
	netutils_domtrans_ping(rgmanager_t)
')

optional_policy(`
	postgresql_domtrans(rgmanager_t)
	postgresql_signal(rgmanager_t)
')

optional_policy(`
	rdisc_exec(rgmanager_t)
')

optional_policy(`
	ricci_dontaudit_rw_modcluster_pipes(rgmanager_t)
')

optional_policy(`
	rpc_domtrans_nfsd(rgmanager_t)
	rpc_domtrans_rpcd(rgmanager_t)
	rpc_manage_nfs_state_data(rgmanager_t)
')

optional_policy(`
	samba_domtrans_smbd(rgmanager_t)
	samba_domtrans_nmbd(rgmanager_t)
	samba_manage_var_files(rgmanager_t)
	samba_rw_config(rgmanager_t)
	samba_signal_smbd(rgmanager_t)
	samba_signal_nmbd(rgmanager_t)
')

optional_policy(`
	sysnet_domtrans_ifconfig(rgmanager_t)
')

optional_policy(`
	udev_read_db(rgmanager_t)
')

optional_policy(`
	virt_stream_connect(rgmanager_t)
')

optional_policy(`
	xen_domtrans_xm(rgmanager_t)
')