dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 1 | # TODO: deal with tmpfs_domain pub/priv split properly |
| 2 | # Read system properties managed by zygote. |
| 3 | allow appdomain zygote_tmpfs:file read; |
Nathan Harold | ee26864 | 2017-12-14 18:20:30 -0800 | [diff] [blame] | 4 | |
Benjamin Gordon | 360559e | 2018-09-06 14:41:34 -0600 | [diff] [blame] | 5 | # Read from (but not create) system_server buffers transferred through |
| 6 | # ashmem, e.g. battery stats. |
| 7 | allow appdomain system_server_tmpfs:file read; |
| 8 | |
ji, zhenlong z | fdfa42b | 2018-10-19 13:21:52 +0800 | [diff] [blame] | 9 | # Get info from priv_app through ashmem, such as contact |
| 10 | # info etc. |
| 11 | allow appdomain priv_app_tmpfs:file read; |
| 12 | |
William Hester | 5f486c7 | 2019-01-15 13:39:30 -0800 | [diff] [blame^] | 13 | # Allow apps to read the Test Harness Mode property. This property is used in |
| 14 | # the implementation of ActivityManager.isDeviceInTestHarnessMode() |
| 15 | get_prop(appdomain, test_harness_prop) |
| 16 | |
Nathan Harold | ee26864 | 2017-12-14 18:20:30 -0800 | [diff] [blame] | 17 | neverallow appdomain system_server:udp_socket { |
Nathan Harold | 252b015 | 2018-03-27 06:34:54 -0700 | [diff] [blame] | 18 | accept append bind create ioctl listen lock name_bind |
| 19 | relabelfrom relabelto setattr shutdown }; |
Nick Kralevich | 1e5021c | 2018-11-28 17:50:24 -0800 | [diff] [blame] | 20 | |
| 21 | # Transition to a non-app domain. |
| 22 | # Exception for the shell and su domains, can transition to runas, etc. |
Nick Kralevich | 0eb0a16 | 2018-12-12 09:06:05 -0800 | [diff] [blame] | 23 | # 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. |
| 26 | neverallow { appdomain -shell userdebug_or_eng(`-su') } |
| 27 | { domain -appdomain -crash_dump -rs }:process { transition }; |
| 28 | neverallow { appdomain -shell userdebug_or_eng(`-su') } |
| 29 | { domain -appdomain }:process { dyntransition }; |
Chalard Jean | fb15c9f | 2018-12-05 14:47:51 +0900 | [diff] [blame] | 30 | |
| 31 | # Disallow apps from using IP memory store |
| 32 | neverallow { appdomain -shell } ipmemorystore_service:service_manager *; |