blob: 4e433eb58fc0c95c7f803ed4ff28268d1b6124cd [file] [log] [blame]
dcashman2e00e632016-10-12 14:58:09 -07001# TODO: deal with tmpfs_domain pub/priv split properly
2# Read system properties managed by zygote.
3allow appdomain zygote_tmpfs:file read;
Nathan Haroldee268642017-12-14 18:20:30 -08004
Benjamin Gordon360559e2018-09-06 14:41:34 -06005# Read from (but not create) system_server buffers transferred through
6# ashmem, e.g. battery stats.
7allow appdomain system_server_tmpfs:file read;
8
ji, zhenlong zfdfa42b2018-10-19 13:21:52 +08009# Get info from priv_app through ashmem, such as contact
10# info etc.
11allow appdomain priv_app_tmpfs:file read;
12
William Hester5f486c72019-01-15 13:39:30 -080013# Allow apps to read the Test Harness Mode property. This property is used in
14# the implementation of ActivityManager.isDeviceInTestHarnessMode()
15get_prop(appdomain, test_harness_prop)
16
Nathan Haroldee268642017-12-14 18:20:30 -080017neverallow appdomain system_server:udp_socket {
Nathan Harold252b0152018-03-27 06:34:54 -070018 accept append bind create ioctl listen lock name_bind
19 relabelfrom relabelto setattr shutdown };
Nick Kralevich1e5021c2018-11-28 17:50:24 -080020
21# Transition to a non-app domain.
22# Exception for the shell and su domains, can transition to runas, etc.
Nick Kralevich0eb0a162018-12-12 09:06:05 -080023# Exception for crash_dump to allow for app crash reporting.
24# Exception for renderscript binaries (/system/bin/bcc, /system/bin/ld.mc)
25# to allow renderscript to create privileged executable files.
26neverallow { appdomain -shell userdebug_or_eng(`-su') }
27 { domain -appdomain -crash_dump -rs }:process { transition };
28neverallow { appdomain -shell userdebug_or_eng(`-su') }
29 { domain -appdomain }:process { dyntransition };
Chalard Jeanfb15c9f2018-12-05 14:47:51 +090030
31# Disallow apps from using IP memory store
32neverallow { appdomain -shell } ipmemorystore_service:service_manager *;