2019-01-15 22:39:30 +01:00
|
|
|
# Allow apps to read the Test Harness Mode property. This property is used in
|
|
|
|
# the implementation of ActivityManager.isDeviceInTestHarnessMode()
|
|
|
|
get_prop(appdomain, test_harness_prop)
|
|
|
|
|
2020-05-21 13:12:55 +02:00
|
|
|
get_prop(appdomain, boot_status_prop)
|
|
|
|
get_prop(appdomain, dalvik_config_prop)
|
2020-07-06 15:24:11 +02:00
|
|
|
get_prop(appdomain, media_config_prop)
|
2020-06-30 18:27:49 +02:00
|
|
|
get_prop(appdomain, packagemanager_config_prop)
|
2020-05-21 13:12:55 +02:00
|
|
|
get_prop(appdomain, surfaceflinger_color_prop)
|
|
|
|
get_prop(appdomain, systemsound_config_prop)
|
2020-06-05 03:40:16 +02:00
|
|
|
get_prop(appdomain, telephony_config_prop)
|
2020-05-21 13:12:55 +02:00
|
|
|
get_prop(appdomain, userspace_reboot_config_prop)
|
|
|
|
get_prop(appdomain, vold_config_prop)
|
|
|
|
|
2019-10-08 17:15:14 +02:00
|
|
|
userdebug_or_eng(`perfetto_producer({ appdomain })')
|
|
|
|
|
2019-12-16 10:59:03 +01:00
|
|
|
# Prevent apps from causing presubmit failures.
|
|
|
|
# Apps can cause selinux denials by accessing CE storage
|
|
|
|
# and/or external storage. In either case, the selinux denial is
|
|
|
|
# not the cause of the failure, but just a symptom that
|
|
|
|
# storage isn't ready. Many apps handle the failure appropriately.
|
|
|
|
#
|
|
|
|
# Apps cannot access external storage before it becomes available.
|
|
|
|
dontaudit appdomain storage_stub_file:dir getattr;
|
|
|
|
# Attempts to write to system_data_file is generally a sign
|
|
|
|
# that apps are attempting to access encrypted storage before
|
|
|
|
# the ACTION_USER_UNLOCKED intent is delivered. Apps are not
|
|
|
|
# allowed to write to CE storage before it's available.
|
|
|
|
# Attempting to do so will be blocked by both selinux and unix
|
|
|
|
# permissions.
|
|
|
|
dontaudit appdomain system_data_file:dir write;
|
2020-04-02 13:36:17 +02:00
|
|
|
# Apps should not be reading vendor-defined properties.
|
|
|
|
dontaudit appdomain vendor_default_prop:file read;
|
2019-12-16 10:59:03 +01:00
|
|
|
|
2017-12-15 03:20:30 +01:00
|
|
|
neverallow appdomain system_server:udp_socket {
|
2018-03-27 15:34:54 +02:00
|
|
|
accept append bind create ioctl listen lock name_bind
|
|
|
|
relabelfrom relabelto setattr shutdown };
|
2018-11-29 02:50:24 +01:00
|
|
|
|
|
|
|
# Transition to a non-app domain.
|
|
|
|
# Exception for the shell and su domains, can transition to runas, etc.
|
2018-12-12 18:06:05 +01:00
|
|
|
# Exception for crash_dump to allow for app crash reporting.
|
|
|
|
# Exception for renderscript binaries (/system/bin/bcc, /system/bin/ld.mc)
|
|
|
|
# to allow renderscript to create privileged executable files.
|
|
|
|
neverallow { appdomain -shell userdebug_or_eng(`-su') }
|
|
|
|
{ domain -appdomain -crash_dump -rs }:process { transition };
|
|
|
|
neverallow { appdomain -shell userdebug_or_eng(`-su') }
|
|
|
|
{ domain -appdomain }:process { dyntransition };
|
2020-05-12 07:50:40 +02:00
|
|
|
|
|
|
|
# Don't allow regular apps access to storage configuration properties.
|
|
|
|
neverallow { appdomain -mediaprovider_app } storage_config_prop:file no_rw_file_perms;
|
2020-06-03 21:20:41 +02:00
|
|
|
|
2020-07-16 15:25:47 +02:00
|
|
|
# Allow to read sendbug.preferred.domain
|
|
|
|
get_prop(appdomain, sendbug_config_prop)
|
|
|
|
|
2020-06-03 21:20:41 +02:00
|
|
|
# Allow to read graphics related properties.
|
|
|
|
get_prop(appdomain, graphics_config_prop)
|