blob: d1f09644126d4ba1eca1684209da2557ff51848b [file] [log] [blame]
Eric Holkf8dfb5f2019-01-11 08:13:01 -08001# viewcompiler
2type viewcompiler, domain, coredomain, mlstrustedsubject;
3type viewcompiler_exec, system_file_type, exec_type, file_type;
Jeff Vander Stoep41a2abf2019-01-23 15:07:40 -08004type viewcompiler_tmpfs, file_type;
Eric Holkf8dfb5f2019-01-11 08:13:01 -08005
6# Reading an APK opens a ZipArchive, which unpack to tmpfs.
7# Use tmpfs_domain() which will give tmpfs files created by viewcompiler their
8# own label, which differs from other labels created by other processes.
9# This allows to distinguish in policy files created by viewcompiler vs other
10# processes.
11tmpfs_domain(viewcompiler)
12
13allow viewcompiler installd:fd use;
14
15# Include write permission for app data files so viewcompiler can generate
16# compiled layout dex files
17allow viewcompiler app_data_file:file { getattr write };
18
19# Allow the view compiler to read resources from the apps APK.
Eric Holk04ee9fb2019-08-15 15:15:30 -070020allow viewcompiler apk_data_file:file { read map };
Eric Holkf8dfb5f2019-01-11 08:13:01 -080021
22# priv-apps are moving to a world where they can only execute
23# signed code. Make sure viewcompiler never can write to privapp
24# directories to avoid introducing unsigned executable code
25neverallow viewcompiler privapp_data_file:file no_w_file_perms;