Move aac_drc props to aac_drc_prop
Bug: 155844385
Test: sepolicy_tests
Change-Id: I1755672b5cef876955f93020c519aaaabf814bbf
diff --git a/private/compat/27.0/27.0.ignore.cil b/private/compat/27.0/27.0.ignore.cil
index 307cac7..b7c2688 100644
--- a/private/compat/27.0/27.0.ignore.cil
+++ b/private/compat/27.0/27.0.ignore.cil
@@ -5,6 +5,7 @@
(typeattribute new_objects)
(typeattributeset new_objects
( new_objects
+ aac_drc_prop
activity_task_service
adb_service
app_binding_service
diff --git a/private/compat/30.0/30.0.cil b/private/compat/30.0/30.0.cil
index c53807f..41ae8a6 100644
--- a/private/compat/30.0/30.0.cil
+++ b/private/compat/30.0/30.0.cil
@@ -1337,7 +1337,10 @@
(typeattributeset ethernet_service_30_0 (ethernet_service))
(typeattributeset exfat_30_0 (exfat))
(typeattributeset exported2_config_prop_30_0 (exported2_config_prop systemsound_config_prop))
-(typeattributeset exported2_default_prop_30_0 (exported2_default_prop libc_debug_prop))
+(typeattributeset exported2_default_prop_30_0
+ ( exported2_default_prop
+ aac_drc_prop
+ libc_debug_prop))
(typeattributeset exported2_radio_prop_30_0 (exported2_radio_prop))
(typeattributeset exported2_system_prop_30_0
( exported2_system_prop
diff --git a/private/property_contexts b/private/property_contexts
index dcf0a68..9114846 100644
--- a/private/property_contexts
+++ b/private/property_contexts
@@ -518,16 +518,15 @@
sys.usb.config u:object_r:exported_system_radio_prop:s0 exact string
sys.usb.configfs u:object_r:exported_system_radio_prop:s0 exact int
-aac_drc_boost u:object_r:exported2_default_prop:s0 exact int
-aac_drc_cut u:object_r:exported2_default_prop:s0 exact int
-aac_drc_enc_target_level u:object_r:exported2_default_prop:s0 exact int
-aac_drc_heavy u:object_r:exported2_default_prop:s0 exact int
-aac_drc_reference_level u:object_r:exported2_default_prop:s0 exact int
+aac_drc_boost u:object_r:aac_drc_prop:s0 exact int
+aac_drc_cut u:object_r:aac_drc_prop:s0 exact int
+aac_drc_enc_target_level u:object_r:aac_drc_prop:s0 exact int
+aac_drc_heavy u:object_r:aac_drc_prop:s0 exact int
+aac_drc_reference_level u:object_r:aac_drc_prop:s0 exact int
+ro.aac_drc_effect_type u:object_r:aac_drc_prop:s0 exact int
build.version.extensions. u:object_r:module_sdkextensions_prop:s0 prefix int
-ro.aac_drc_effect_type u:object_r:exported2_default_prop:s0 exact int
-
drm.64bit.enabled u:object_r:exported2_default_prop:s0 exact bool
dumpstate.dry_run u:object_r:exported_dumpstate_prop:s0 exact bool
diff --git a/public/domain.te b/public/domain.te
index b23303d..2e17f42 100644
--- a/public/domain.te
+++ b/public/domain.te
@@ -541,6 +541,8 @@
neverallow { domain -coredomain -vendor_init } exported_pm_prop:file no_rw_file_perms;
')
+neverallow { domain -init } aac_drc_prop:property_service set;
+
# Do not allow reading device's serial number from system properties except form
# a few whitelisted domains.
neverallow {
diff --git a/public/property.te b/public/property.te
index 90d1961..8a99996 100644
--- a/public/property.te
+++ b/public/property.te
@@ -54,6 +54,7 @@
')
# Properties which can't be written outside system
+system_restricted_prop(aac_drc_prop)
system_restricted_prop(binder_cache_bluetooth_server_prop)
system_restricted_prop(binder_cache_system_server_prop)
system_restricted_prop(binder_cache_telephony_server_prop)
diff --git a/vendor/mediacodec.te b/vendor/mediacodec.te
index d6d0de1..b4c6df4 100644
--- a/vendor/mediacodec.te
+++ b/vendor/mediacodec.te
@@ -23,6 +23,9 @@
crash_dump_fallback(mediacodec)
+# get aac_drc_* properties
+get_prop(mediacodec, aac_drc_prop)
+
# mediacodec should never execute any executable without a domain transition
neverallow mediacodec { file_type fs_type }:file execute_no_trans;