wangxl | 5b6293a | 2015-02-03 21:10:20 +0800 | [diff] [blame^] | 1 | # tee starts as root, and drops privileges |
| 2 | allow tee self:capability { setuid setgid dac_override sys_rawio }; |
| 3 | |
| 4 | # Need to directly manipulate certain block devices |
| 5 | # for anti-rollback protection |
| 6 | allow tee block_device:dir r_dir_perms; |
| 7 | allow tee rpmb_device:blk_file rw_file_perms; |
| 8 | |
| 9 | |
| 10 | # Allow qseecom to qsee folder so that listeners can create |
| 11 | # respective directories |
| 12 | allow tee data_qsee_file:dir create_dir_perms; |
| 13 | allow tee data_qsee_file:file create_file_perms; |
| 14 | allow tee system_data_file:dir r_dir_perms; |
| 15 | |
| 16 | allow tee persist_file:dir r_dir_perms; |
| 17 | r_dir_file(tee, persist_data_file) |
| 18 | # Write to drm related pieces of persist partition |
| 19 | allow tee persist_drm_file:dir create_dir_perms; |
| 20 | allow tee persist_drm_file:file create_file_perms; |
| 21 | |
| 22 | # Provide tee access to ssd partition for HW FDE |
| 23 | allow tee ssd_device:blk_file rw_file_perms; |
| 24 | |
| 25 | # allow tee to operate tee device |
| 26 | allow tee tee_device:chr_file rw_file_perms; |
| 27 | |
| 28 | # allow tee to load firmware images |
| 29 | allow tee firmware_file:dir r_dir_perms; |
| 30 | allow tee firmware_file:file r_file_perms; |
| 31 | |
| 32 | # allow qseecom access to time domain |
| 33 | allow tee time_daemon:unix_stream_socket connectto; |
| 34 | |
| 35 | # allow tee access for secure UI to work |
| 36 | allow tee graphics_device:chr_file r_file_perms; |
| 37 | allow tee graphics_device:dir r_dir_perms; |
| 38 | |
| 39 | binder_call(tee, surfaceflinger) |
| 40 | binder_use(tee) |
| 41 | |
| 42 | allow tee system_app:unix_dgram_socket sendto; |
| 43 | unix_socket_connect(tee, property, init) |
| 44 | |
| 45 | userdebug_or_eng(` |
| 46 | allow tee su:unix_dgram_socket sendto; |
| 47 | allow tee shell_data_file:file rw_file_perms; |
| 48 | allow tee shell_data_file:dir search; |
| 49 | ') |