Add selinux policies for traced_relay.relay_port sysprop
Define the traced_relay.relay_port sysprop as system internal
property and allowed traced_relay to read it. This property should only
be settable in debug builds.
Test: build perfetto in Android tree and use it
Bug: 393210308
Change-Id: I7f44eef6216cd83876f675737e288b9cab6905d1
diff --git a/private/traced.te b/private/traced.te
index 8a29541..1aaf0d1 100644
--- a/private/traced.te
+++ b/private/traced.te
@@ -56,6 +56,9 @@
# Allow traced to detect if a process is frozen (b/381089063).
allow traced cgroup_v2:file r_file_perms;
+# Allow traced_relay to read the relay port being used
+get_prop(traced, traced_relay_relay_port_prop)
+
# Allow setting debug properties which guard initialization of the Perfetto SDK
# in SurfaceFlinger and HWUI's copy of Skia.
# Required for the android.sdk_sysprop_guard data source.