blob: 1c23f572745c84e0aabb16a4dc812cb1827b1bf1 [file] [log] [blame]
Calin Juravlee5a1f642017-01-17 20:31:31 -08001# dexoptanalyzer
Alex Klyubinf5446eb2017-03-23 14:27:32 -07002type dexoptanalyzer, domain, coredomain, mlstrustedsubject;
Calin Juravlee5a1f642017-01-17 20:31:31 -08003type dexoptanalyzer_exec, exec_type, file_type;
4
5# Reading an APK opens a ZipArchive, which unpack to tmpfs.
6# Use tmpfs_domain() which will give tmpfs files created by dexoptanalyzer their
7# own label, which differs from other labels created by other processes.
8# This allows to distinguish in policy files created by dexoptanalyzer vs other
9#processes.
10tmpfs_domain(dexoptanalyzer)
11
12# Read symlinks in /data/dalvik-cache. This is required for PIC mode boot
13# app_data_file the oat file is symlinked to the original file in /system.
14allow dexoptanalyzer dalvikcache_data_file:dir { getattr search };
15allow dexoptanalyzer dalvikcache_data_file:file r_file_perms;
16allow dexoptanalyzer dalvikcache_data_file:lnk_file read;
17
18allow dexoptanalyzer installd:fd use;
19
20# Allow reading secondary dex files that were reported by the app to the
21# package manager.
22allow dexoptanalyzer app_data_file:dir { getattr search };
23allow dexoptanalyzer app_data_file:file r_file_perms;
Jeff Vander Stoep06aee352017-06-26 15:08:37 -070024# dexoptanalyzer calls access(2) with W_OK flag on app data. We can use the
25# "dontaudit...audit_access" policy line to suppress the audit access without
26# suppressing denial on actual access.
27dontaudit dexoptanalyzer app_data_file:dir audit_access;
Calin Juravlee5a1f642017-01-17 20:31:31 -080028
29# Allow testing /data/user/0 which symlinks to /data/data
30allow dexoptanalyzer system_data_file:lnk_file { getattr };