blob: d09c24cc0ce836b7acbc80d291454658858a2fa3 [file] [log] [blame]
Biswajit Paul28439f92015-07-15 13:28:27 -07001# Copyright (c) 2015, 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
28#qfp daemon for ultrasonic fingerprint sensor
29type qfp-daemon, domain;
30type qfp-daemon_exec, exec_type, file_type;
31
32net_domain(qfp-daemon)
33init_daemon_domain(qfp-daemon)
34
35binder_call(qfp-daemon, servicemanager)
36binder_call(qfp-daemon, system_app)
Avijit Kanti Das8469d2c2015-09-18 07:55:17 -070037binder_call(qfp-daemon, fingerprintd)
Biswajit Paul28439f92015-07-15 13:28:27 -070038binder_use(qfp-daemon)
39
40allow qfp-daemon qfp-daemon_data_file:dir { rw_dir_perms setattr };
41allow qfp-daemon qfp-daemon_data_file:file create_file_perms;
42
43# Access to tee_device
44allow qfp-daemon tee_device:chr_file rw_file_perms;
45
Lior Barenboimd9799ca2016-05-06 11:11:52 -070046# Access QFP Android Proxy
47allow qfp-daemon qfp_proxy_service:service_manager find;
48
Biswajit Paul28439f92015-07-15 13:28:27 -070049# Add IQfpService service
50allow qfp-daemon iqfp_service:service_manager add;
51
52# Read system property
53allow qfp-daemon property_socket:sock_file write;
54
55# RW to device driver
Amal Paul6f621702015-07-19 22:43:13 -070056allow qfp-daemon qbt1000_device:chr_file rw_file_perms;
Biswajit Paul28439f92015-07-15 13:28:27 -070057
58# R dir perms for firmware dir
59r_dir_file(qfp-daemon, firmware_file)
Lior Barenboim77754242015-08-25 09:34:05 +030060
Steve Kondik1ae3df42016-05-19 21:45:22 -070061# R dir perms for persist qc_senseid dir
62r_dir_file(qfp-daemon, persist_file)
63r_dir_file(qfp-daemon, persist_qc_senseid_file)
64
Lior Barenboim77754242015-08-25 09:34:05 +030065# Allow qfp daemon access to system server
66binder_call(qfp-daemon, system_server);
67
68# Allow read to sensor device and read/write to sensor socket
69allow qfp-daemon sensors_device:chr_file r_file_perms;
70allow qfp-daemon sensors_socket:sock_file rw_file_perms;
71allow qfp-daemon sensors:unix_stream_socket connectto;
Lior Barenboimffc507b2015-10-07 13:40:08 +030072
73# Allow listing input devices and sending input events
74allow qfp-daemon input_device:chr_file rw_file_perms;
75allow qfp-daemon input_device:dir r_dir_perms;