forked from fedora-selinux/selinux-policy-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apm.te
246 lines (184 loc) · 5.23 KB
/
apm.te
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
policy_module(apm, 1.12.0)
########################################
#
# Declarations
#
attribute_role apm_roles;
roleattribute system_r apm_roles;
type apmd_t;
type apmd_exec_t;
init_daemon_domain(apmd_t, apmd_exec_t)
type apmd_initrc_exec_t;
init_script_file(apmd_initrc_exec_t)
type apm_t;
type apm_exec_t;
application_domain(apm_t, apm_exec_t)
role apm_roles types apm_t;
type apmd_lock_t;
files_lock_file(apmd_lock_t)
type apmd_log_t;
logging_log_file(apmd_log_t)
type apmd_tmp_t;
files_tmp_file(apmd_tmp_t)
type apmd_var_lib_t;
files_type(apmd_var_lib_t)
type apmd_var_run_t;
files_pid_file(apmd_var_run_t)
type apmd_unit_file_t;
systemd_unit_file(apmd_unit_file_t)
########################################
#
# Client local policy
#
allow apm_t self:capability { dac_read_search sys_admin sys_resource };
kernel_read_system_state(apm_t)
dev_rw_apm_bios(apm_t)
fs_getattr_xattr_fs(apm_t)
term_use_all_inherited_terms(apm_t)
domain_use_interactive_fds(apm_t)
logging_send_syslog_msg(apm_t)
########################################
#
# Server local policy
#
allow apmd_t self:capability { sys_admin sys_nice sys_time kill mknod sys_resource };
dontaudit apmd_t self:capability { setuid dac_read_search sys_tty_config };
allow apmd_t self:process { signal_perms getsession };
allow apmd_t self:fifo_file rw_fifo_file_perms;
allow apmd_t self:netlink_socket create_socket_perms;
allow apmd_t self:netlink_generic_socket create_socket_perms;
allow apmd_t self:unix_stream_socket { accept listen };
allow apmd_t apmd_lock_t:file manage_file_perms;
files_lock_filetrans(apmd_t, apmd_lock_t, file)
allow apmd_t apmd_log_t:file manage_file_perms;
logging_log_filetrans(apmd_t, apmd_log_t, file)
manage_dirs_pattern(apmd_t, apmd_tmp_t, apmd_tmp_t)
manage_files_pattern(apmd_t, apmd_tmp_t, apmd_tmp_t)
files_tmp_filetrans(apmd_t, apmd_tmp_t, { file dir })
manage_dirs_pattern(apmd_t, apmd_var_lib_t, apmd_var_lib_t)
manage_files_pattern(apmd_t, apmd_var_lib_t, apmd_var_lib_t)
files_var_lib_filetrans(apmd_t, apmd_var_lib_t, dir)
manage_files_pattern(apmd_t, apmd_var_run_t, apmd_var_run_t)
manage_sock_files_pattern(apmd_t, apmd_var_run_t, apmd_var_run_t)
files_pid_filetrans(apmd_t, apmd_var_run_t, { file sock_file })
can_exec(apmd_t, apmd_var_run_t)
kernel_read_kernel_sysctls(apmd_t)
kernel_rw_all_sysctls(apmd_t)
kernel_read_system_state(apmd_t)
kernel_write_proc_files(apmd_t)
kernel_request_load_module(apmd_t)
dev_read_input(apmd_t)
dev_read_mouse(apmd_t)
dev_read_realtime_clock(apmd_t)
dev_read_urand(apmd_t)
dev_rw_apm_bios(apmd_t)
dev_rw_sysfs(apmd_t)
dev_dontaudit_getattr_all_chr_files(apmd_t)
dev_dontaudit_getattr_all_blk_files(apmd_t)
files_exec_etc_files(apmd_t)
files_read_etc_runtime_files(apmd_t)
files_dontaudit_getattr_all_files(apmd_t)
files_dontaudit_getattr_all_symlinks(apmd_t)
files_dontaudit_getattr_all_pipes(apmd_t)
files_dontaudit_getattr_all_sockets(apmd_t)
fs_dontaudit_list_tmpfs(apmd_t)
fs_getattr_all_fs(apmd_t)
fs_search_auto_mountpoints(apmd_t)
fs_dontaudit_getattr_all_files(apmd_t)
fs_dontaudit_getattr_all_symlinks(apmd_t)
fs_dontaudit_getattr_all_pipes(apmd_t)
fs_dontaudit_getattr_all_sockets(apmd_t)
fs_read_cgroup_files(apmd_t)
corecmd_exec_all_executables(apmd_t)
domain_read_all_domains_state(apmd_t)
domain_dontaudit_ptrace_all_domains(apmd_t)
domain_use_interactive_fds(apmd_t)
domain_dontaudit_getattr_all_sockets(apmd_t)
domain_dontaudit_getattr_all_key_sockets(apmd_t)
domain_dontaudit_list_all_domains_state(apmd_t)
auth_use_nsswitch(apmd_t)
init_domtrans_script(apmd_t)
init_read_utmp(apmd_t)
init_telinit(apmd_t)
init_dbus_chat(apmd_t)
libs_exec_ld_so(apmd_t)
libs_exec_lib_files(apmd_t)
logging_send_audit_msgs(apmd_t)
logging_send_syslog_msg(apmd_t)
miscfiles_read_hwdata(apmd_t)
modutils_domtrans_insmod(apmd_t)
modutils_read_module_config(apmd_t)
seutil_sigchld_newrole(apmd_t)
userdom_dontaudit_use_unpriv_user_fds(apmd_t)
userdom_dontaudit_search_user_home_dirs(apmd_t)
userdom_dontaudit_search_user_home_content(apmd_t) # Excessive?
optional_policy(`
automount_domtrans(apmd_t)
')
optional_policy(`
clock_domtrans(apmd_t)
clock_rw_adjtime(apmd_t)
')
optional_policy(`
cron_system_entry(apmd_t, apmd_exec_t)
cron_anacron_domtrans_system_job(apmd_t)
')
optional_policy(`
devicekit_manage_pid_files(apmd_t)
devicekit_manage_log_files(apmd_t)
devicekit_relabel_log_files(apmd_t)
')
optional_policy(`
dbus_system_bus_client(apmd_t)
optional_policy(`
consolekit_dbus_chat(apmd_t)
')
optional_policy(`
networkmanager_dbus_chat(apmd_t)
')
')
optional_policy(`
fstools_domtrans(apmd_t)
')
optional_policy(`
iptables_domtrans(apmd_t)
')
optional_policy(`
logrotate_use_fds(apmd_t)
')
optional_policy(`
mta_send_mail(apmd_t)
')
optional_policy(`
netutils_domtrans(apmd_t)
')
optional_policy(`
pcmcia_domtrans_cardmgr(apmd_t)
pcmcia_domtrans_cardctl(apmd_t)
')
optional_policy(`
shutdown_domtrans(apmd_t)
')
optional_policy(`
sssd_search_lib(apmd_t)
')
optional_policy(`
systemd_dbus_chat_logind(apmd_t)
')
optional_policy(`
systemd_start_power_services(apmd_t)
systemd_status_power_services(apmd_t)
')
optional_policy(`
sysnet_domtrans_ifconfig(apmd_t)
')
optional_policy(`
udev_read_db(apmd_t)
udev_read_state(apmd_t)
')
optional_policy(`
vbetool_domtrans(apmd_t)
')
optional_policy(`
xserver_domtrans(apmd_t)
')