From 2597b513b368c0ab09ccfc1b78a2885ec1650ea0 Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Sat, 8 Feb 2020 08:34:17 +0900 Subject: [PATCH] Move some properties to system_vendor_config_prop system_vendor_config_prop defines a property contexts which can only be set from vendor_init. It is one of the mostly used patterns of system properties. This migrates some properties to help readability and security. Bug: 148125056 Test: system/sepolicy/build_policies.sh Change-Id: I6b53ef520331b32417ad59f4daa04bdfc077f682 --- public/property.te | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/public/property.te b/public/property.te index f30663ae1..e98790623 100644 --- a/public/property.te +++ b/public/property.te @@ -102,13 +102,25 @@ compatible_property_only(` system_restricted_prop(vold_prop) ') +# Properties which can be written only by vendor_init +system_vendor_config_prop(apk_verity_prop) +system_vendor_config_prop(cpu_variant_prop) +system_vendor_config_prop(exported_audio_prop) +system_vendor_config_prop(exported_camera_prop) +system_vendor_config_prop(exported_config_prop) +system_vendor_config_prop(exported_default_prop) +system_vendor_config_prop(exported3_default_prop) +system_vendor_config_prop(userspace_reboot_config_prop) +system_vendor_config_prop(vehicle_hal_prop) +system_vendor_config_prop(vendor_security_patch_level_prop) +system_vendor_config_prop(vndk_prop) +system_vendor_config_prop(virtual_ab_prop) + # Properties with no restrictions system_public_prop(audio_prop) -system_public_prop(apk_verity_prop) system_public_prop(bluetooth_a2dp_offload_prop) system_public_prop(bluetooth_audio_hal_prop) system_public_prop(bluetooth_prop) -system_public_prop(cpu_variant_prop) system_public_prop(ctl_default_prop) system_public_prop(ctl_interface_start_prop) system_public_prop(ctl_start_prop) @@ -120,14 +132,9 @@ system_public_prop(exported2_config_prop) system_public_prop(exported2_radio_prop) system_public_prop(exported2_system_prop) system_public_prop(exported2_vold_prop) -system_public_prop(exported3_default_prop) system_public_prop(exported3_radio_prop) -system_public_prop(exported_audio_prop) system_public_prop(exported_bluetooth_prop) -system_public_prop(exported_camera_prop) -system_public_prop(exported_config_prop) system_public_prop(exported_dalvik_prop) -system_public_prop(exported_default_prop) system_public_prop(exported_ffs_prop) system_public_prop(exported_overlay_prop) system_public_prop(exported_pm_prop) @@ -147,11 +154,6 @@ system_public_prop(powerctl_prop) system_public_prop(radio_prop) system_public_prop(serialno_prop) system_public_prop(system_prop) -system_public_prop(userspace_reboot_config_prop) -system_public_prop(vehicle_hal_prop) -system_public_prop(vendor_security_patch_level_prop) -system_public_prop(virtual_ab_prop) -system_public_prop(vndk_prop) system_public_prop(wifi_log_prop) system_public_prop(wifi_prop)