Tri Vo | bc8dc3a | 2019-05-26 13:17:08 -0700 | [diff] [blame^] | 1 | # profman |
| 2 | type profman, domain; |
| 3 | type profman_exec, system_file_type, exec_type, file_type; |
| 4 | |
| 5 | allow profman user_profile_data_file:file { getattr read write lock map }; |
| 6 | |
| 7 | # Dumping profile info opens the application APK file for pretty printing. |
| 8 | allow profman asec_apk_file:file { read map }; |
| 9 | allow profman apk_data_file:file { getattr read map }; |
| 10 | allow profman apk_data_file:dir { getattr read search }; |
| 11 | |
| 12 | allow profman oemfs:file { read map }; |
| 13 | # Reading an APK opens a ZipArchive, which unpack to tmpfs. |
| 14 | allow profman tmpfs:file { read map }; |
| 15 | allow profman profman_dump_data_file:file { write map }; |
| 16 | |
| 17 | allow profman installd:fd use; |
| 18 | |
| 19 | # Allow profman to analyze profiles for the secondary dex files. These |
| 20 | # are application dex files reported back to the framework when using |
| 21 | # BaseDexClassLoader. |
| 22 | allow profman { privapp_data_file app_data_file }:file { getattr read write lock map }; |
| 23 | allow profman { privapp_data_file app_data_file }:dir { getattr read search }; |
| 24 | |
| 25 | ### |
| 26 | ### neverallow rules |
| 27 | ### |
| 28 | |
| 29 | neverallow profman { privapp_data_file app_data_file }:notdevfile_class_set open; |