Allow system server to set persist.traced.enable

To enable/disable the traced and traced_probes deamons remotely we would
like system server to be able to set persist.traced.enable.
See also ag/3736001.

Denial:
selinux: avc: denied { set } for
property=persist.traced.enable
pid=1606 uid=1000 gid=1000
scontext=u:r:system_server:s0
tcontext=u:object_r:default_prop:s0 tclass=property_service
permissive=0\x0a

Run:
$ adb shell 'ps -A | grep traced'
Should see traced.
$ adb shell 'settings put global sys_traced 0'
$ adb shell 'ps -A | grep traced'
Should no longer see traced.

Test: See above.
Change-Id: I245b7df3853cabeb0e75db41fb4facaa178ab8f1
This commit is contained in:
Hector Dearman 2018-03-19 14:18:48 +00:00
parent 8e0b882cd6
commit 6f2040f873
5 changed files with 5 additions and 0 deletions

View file

@ -105,6 +105,7 @@
traced_probes_exec
traced_probes_tmpfs
traced_producer_socket
traced_prop
traced_tmpfs
update_engine_log_data_file
vendor_default_prop

View file

@ -78,6 +78,7 @@
traced_probes_exec
traced_probes_tmpfs
traced_producer_socket
traced_prop
traced_tmpfs
traceur_app
traceur_app_tmpfs

View file

@ -59,6 +59,7 @@ persist.sys.audit_safemode u:object_r:safemode_prop:s0
persist.service. u:object_r:system_prop:s0
persist.service.bdroid. u:object_r:bluetooth_prop:s0
persist.security. u:object_r:system_prop:s0
persist.traced. u:object_r:traced_prop:s0
persist.vendor.overlay. u:object_r:overlay_prop:s0
ro.boot.vendor.overlay. u:object_r:overlay_prop:s0
ro.boottime. u:object_r:boottime_prop:s0

View file

@ -497,6 +497,7 @@ set_prop(system_server, overlay_prop)
set_prop(system_server, exported_overlay_prop)
set_prop(system_server, pm_prop)
set_prop(system_server, exported_pm_prop)
set_prop(system_server, traced_prop)
userdebug_or_eng(`set_prop(system_server, wifi_log_prop)')
# ctl interface

View file

@ -50,6 +50,7 @@ type shell_prop, property_type, core_property_type;
type system_boot_reason_prop, property_type;
type system_prop, property_type, core_property_type;
type system_radio_prop, property_type, core_property_type;
type traced_prop, property_type;
type vold_prop, property_type, core_property_type;
type wifi_log_prop, property_type, log_property_type;
type wifi_prop, property_type;