From 730957aef3f96ef5fa294515829ab7a37fd141cf Mon Sep 17 00:00:00 2001
From: Stephen Smalley <sds@tycho.nsa.gov>
Date: Wed, 4 Apr 2012 16:01:19 -0400
Subject: [PATCH] Rework the radio vs rild property split. Only label
 properties with the ril. prefix with rild_prop. Allow rild and system (and
 radio) to set radio_prop. Only rild can set rild_prop presently.

---
 property_contexts | 8 ++------
 rild.te           | 1 +
 system.te         | 1 +
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/property_contexts b/property_contexts
index 320179c60..dc87c9bf8 100644
--- a/property_contexts
+++ b/property_contexts
@@ -7,17 +7,13 @@ net.gprs                u:object_r:radio_prop:s0
 net.ppp                 u:object_r:radio_prop:s0
 net.qmi                 u:object_r:radio_prop:s0
 net.lte                 u:object_r:radio_prop:s0
+net.cdma                u:object_r:radio_prop:s0
+gsm.                    u:object_r:radio_prop:s0
 persist.radio           u:object_r:radio_prop:s0
 net.dns                 u:object_r:radio_prop:s0
 sys.usb.config          u:object_r:radio_prop:s0
-gsm.current.phone-type  u:object_r:radio_prop:s0
-gsm.sim.                u:object_r:radio_prop:s0
-gsm.operator.           u:object_r:radio_prop:s0
-gsm.version.baseband    u:object_r:radio_prop:s0
 
 ril.                    u:object_r:rild_prop:s0
-gsm.                    u:object_r:rild_prop:s0
-net.cdma                u:object_r:rild_prop:s0
 
 net.                    u:object_r:system_prop:s0
 dev.                    u:object_r:system_prop:s0
diff --git a/rild.te b/rild.te
index 684bc1d3b..a0a4a374a 100644
--- a/rild.te
+++ b/rild.te
@@ -23,3 +23,4 @@ allow rild sysfs:file rw_file_perms;
 
 # property service
 allow rild rild_prop:property_service set;
+allow rild radio_prop:property_service set;
diff --git a/system.te b/system.te
index 58e4f4748..6466e9664 100644
--- a/system.te
+++ b/system.te
@@ -148,6 +148,7 @@ allow system wallpaper_file:file r_file_perms;
 
 # Property Service write
 allow system system_prop:property_service set;
+allow system radio_prop:property_service set;
 
 # ctl interface
 allow system ctl_default_prop:property_service set;
-- 
GitLab