sepolicy: Added support for vendor_audio_prop for audio props

Added support for vendor_audio_prop and moved all audio
properties to that type. This is done to conform with Treble
guidelines where vendor domains can access only vendor props.
Added access to only selective domains that need access to
these props.

Change-Id: Ic8999407bb77f265389ca07323099a11cf281563
This commit is contained in:
Arun Mirpuri
2018-06-12 18:49:58 -07:00
committed by Gerrit - the friendly Code Review server
parent 32cd5d657e
commit 5cb6a57305
4 changed files with 12 additions and 4 deletions

View File

@@ -2,6 +2,8 @@ binder_call(audioserver, bootanim)
allow audioserver sysfs_soc:file r_file_perms;
allow audioserver sysfs_soc:dir search;
# audio properties
get_prop(audioserver, vendor_audio_prop)
userdebug_or_eng(`
diag_use(audioserver)

View File

@@ -31,3 +31,6 @@ vndbinder_use(hal_audio)
#allow acess to wcd_cpe
allow hal_audio sysfs_audio:file rw_file_perms;
allow hal_audio sysfs_audio:dir r_dir_perms ;
# audio properties
get_prop(hal_audio, vendor_audio_prop)

View File

@@ -40,6 +40,9 @@ type ctl_vendor_hbtp_prop, property_type;
# Bluetooth props
type vendor_bluetooth_prop, property_type;
# Audio props
type vendor_audio_prop, property_type;
#ss-restart
type vendor_ssr_prop, property_type;

View File

@@ -14,10 +14,10 @@ ctl.vendor.ipacm-diag u:object_r:ipacm-diag_prop:s0
ctl.vendor.dataqti u:object_r:vendor_dataqti_prop:s0
ctl.vendor.sensors u:object_r:sensors_prop:s0
ctl.thermal-engine u:object_r:thermal_prop:s0
vendor.audio. u:object_r:debug_prop:s0
vendor.voice. u:object_r:debug_prop:s0
persist.vendor.audio. u:object_r:debug_prop:s0
ro.vendor.audio. u:object_r:debug_prop:s0
vendor.audio. u:object_r:vendor_audio_prop:s0
vendor.voice. u:object_r:vendor_audio_prop:s0
persist.vendor.audio. u:object_r:vendor_audio_prop:s0
ro.vendor.audio. u:object_r:vendor_audio_prop:s0
debug.gralloc. u:object_r:debug_gralloc_prop:s0
debug.ramdump. u:object_r:ramdump_prop:s0
debug.ssrdump u:object_r:ssr_prop:s0