blob: c39cd7b9202b2b845e6c23977faa837f3869779a [file] [log] [blame]
Divya Sharmaf4978362017-06-16 16:19:31 -07001# Copyright (c) 2017, The Linux Foundation. All rights reserved.
2#
3# Redistribution and use in source and binary forms, with or without
4# modification, are permitted provided that the following conditions are
5# met:
6# * Redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer.
8# * Redistributions in binary form must reproduce the above
9# copyright notice, this list of conditions and the following
10# disclaimer in the documentation and/or other materials provided
11# with the distribution.
12# * Neither the name of The Linux Foundation nor the names of its
13# contributors may be used to endorse or promote products derived
14# from this software without specific prior written permission.
15#
16# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21# # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28type seempd, domain, mlstrustedsubject, coredomain;
29type seempd_exec, exec_type, file_type;
30
31init_daemon_domain(seempd)
32
33allow seempd tee_device:chr_file rw_file_perms;
34allow seempd seemplog_device:chr_file rw_file_perms;
35#TODO: create the dir from init.rc instead.
36allow seempd seemp_data_file:dir create_dir_perms;
37allow seempd seemp_data_file:{ file fifo_file } create_file_perms;
38
39# allow seempd to load firmware images
40#r_dir_file(seempd, firmware_file)
41
42#allow access to packages.list
43allow seempd system_data_file:file r_file_perms;
44
45#allow binder calls
46binder_use(seempd)
47binder_call(seempd, system_server)
48binder_call(seempd, appdomain)
Dinesh K Garge8e5bd92017-08-15 17:57:45 -070049binder_call(seempd, smcinvoke_daemon)
Divya Sharmaf4978362017-06-16 16:19:31 -070050
Yida Wang826b91c2017-08-30 09:24:09 -040051allow seempd MinkBinderSvc:service_manager { find };
Yida Wang0a41d022017-08-22 18:51:39 -040052
Divya Sharmaf4978362017-06-16 16:19:31 -070053#for seemp
54allow seempd seemp_service:service_manager { find add };
55allow seempd self:binder call;
56allow seempd ion_device:chr_file r_file_perms;
57
58#for package verifier
Yida Wangbecfa822017-06-19 15:38:00 -040059allow seempd { apk_data_file apk_tmp_file apk_private_tmp_file }:dir r_dir_perms;
60allow seempd { apk_data_file apk_tmp_file apk_private_tmp_file }:file r_file_perms;
Divya Sharmaf4978362017-06-16 16:19:31 -070061allow seempd storage_file:dir r_dir_perms;
62allow seempd storage_file:lnk_file r_file_perms;
63allow seempd mnt_user_file:dir r_dir_perms;
64allow seempd mnt_user_file:lnk_file r_file_perms;
65allow seempd fuse:dir r_dir_perms;
66allow seempd fuse:file r_file_perms;
Yida Wangbecfa822017-06-19 15:38:00 -040067
68#for read network state data
69allow seempd proc_net:file r_file_perms;