Abir Ghosh | 2cd6e6e | 2017-02-08 15:08:55 +0530 | [diff] [blame] | 1 | # Copyright (c) 2017 Linux Foundation. All rights reserved. |
Biswajit Paul | 28439f9 | 2015-07-15 13:28:27 -0700 | [diff] [blame] | 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 |
Biswajit Paul | 6786a92 | 2017-03-16 11:53:53 -0700 | [diff] [blame] | 29 | type qfp-daemon, domain; |
Ravi Kumar Siddojigari | c7def12 | 2017-06-13 00:49:19 +0530 | [diff] [blame] | 30 | type qfp-daemon_exec, exec_type, vendor_file_type, file_type; |
Biswajit Paul | 28439f9 | 2015-07-15 13:28:27 -0700 | [diff] [blame] | 31 | |
Abir Ghosh | dcfb557 | 2017-05-31 15:25:06 +0530 | [diff] [blame] | 32 | hal_server_domain(qfp-daemon, hal_fingerprint) |
Biswajit Paul | 28439f9 | 2015-07-15 13:28:27 -0700 | [diff] [blame] | 33 | init_daemon_domain(qfp-daemon) |
| 34 | |
Ravi Kumar Siddojigari | c7def12 | 2017-06-13 00:49:19 +0530 | [diff] [blame] | 35 | #binder_call(qfp-daemon, servicemanager) |
Biswajit Paul | 28439f9 | 2015-07-15 13:28:27 -0700 | [diff] [blame] | 36 | binder_call(qfp-daemon, system_app) |
Abir Ghosh | 2cd6e6e | 2017-02-08 15:08:55 +0530 | [diff] [blame] | 37 | binder_call(qfp-daemon, fps_hal) |
Ravi Kumar Siddojigari | c7def12 | 2017-06-13 00:49:19 +0530 | [diff] [blame] | 38 | #binder_use(qfp-daemon) |
Biswajit Paul | 28439f9 | 2015-07-15 13:28:27 -0700 | [diff] [blame] | 39 | |
| 40 | allow qfp-daemon qfp-daemon_data_file:dir { rw_dir_perms setattr }; |
| 41 | allow qfp-daemon qfp-daemon_data_file:file create_file_perms; |
| 42 | |
| 43 | # Access to tee_device |
| 44 | allow qfp-daemon tee_device:chr_file rw_file_perms; |
| 45 | |
Abir Ghosh | 2cd6e6e | 2017-02-08 15:08:55 +0530 | [diff] [blame] | 46 | # Access QFP Android Proxy |
Ravi Kumar Siddojigari | c7def12 | 2017-06-13 00:49:19 +0530 | [diff] [blame] | 47 | #allow qfp-daemon qfp_proxy_service:service_manager find; |
Abir Ghosh | 2cd6e6e | 2017-02-08 15:08:55 +0530 | [diff] [blame] | 48 | |
Biswajit Paul | 28439f9 | 2015-07-15 13:28:27 -0700 | [diff] [blame] | 49 | # Read system property |
| 50 | allow qfp-daemon property_socket:sock_file write; |
| 51 | |
| 52 | # RW to device driver |
Amal Paul | 6f62170 | 2015-07-19 22:43:13 -0700 | [diff] [blame] | 53 | allow qfp-daemon qbt1000_device:chr_file rw_file_perms; |
Biswajit Paul | 28439f9 | 2015-07-15 13:28:27 -0700 | [diff] [blame] | 54 | |
| 55 | # R dir perms for firmware dir |
| 56 | r_dir_file(qfp-daemon, firmware_file) |
Lior Barenboim | 7775424 | 2015-08-25 09:34:05 +0300 | [diff] [blame] | 57 | |
Abir Ghosh | 2cd6e6e | 2017-02-08 15:08:55 +0530 | [diff] [blame] | 58 | # R dir perms for persist qc_senseid dir |
| 59 | r_dir_file(qfp-daemon, persist_file) |
| 60 | r_dir_file(qfp-daemon, persist_qti_fp_file) |
| 61 | |
Lior Barenboim | ffc507b | 2015-10-07 13:40:08 +0300 | [diff] [blame] | 62 | # Allow listing input devices and sending input events |
| 63 | allow qfp-daemon input_device:chr_file rw_file_perms; |
| 64 | allow qfp-daemon input_device:dir r_dir_perms; |
Biswajit Paul | 277acbb | 2016-07-20 12:02:14 -0700 | [diff] [blame] | 65 | |
| 66 | #diag |
| 67 | userdebug_or_eng(` |
| 68 | diag_use(qfp-daemon) |
| 69 | ') |