Allow Bluetooth app to initiate DHCP service on bt-pan interface.
bug:15407087
Change-Id: I3dea9c1110583f11f093d048455a1cc739d05658
diff --git a/bluetooth.te b/bluetooth.te
index 8869ce6..7d56d45 100644
--- a/bluetooth.te
+++ b/bluetooth.te
@@ -45,6 +45,8 @@
# Allow write access to bluetooth specific properties
allow bluetooth bluetooth_prop:property_service set;
+allow bluetooth pan_result_prop:property_service set;
+allow bluetooth ctl_dhcp_pan_prop:property_service set;
###
### Neverallow rules
diff --git a/dhcp.te b/dhcp.te
index 9e461a4..2e5b3d4 100644
--- a/dhcp.te
+++ b/dhcp.te
@@ -14,6 +14,7 @@
# For /proc/sys/net/ipv4/conf/*/promote_secondaries
allow dhcp proc_net:file write;
allow dhcp system_prop:property_service set ;
+allow dhcp pan_result_prop:property_service set;
unix_socket_connect(dhcp, property, init)
type_transition dhcp system_data_file:{ dir file } dhcp_data_file;
diff --git a/property.te b/property.te
index 3195caf..aa1c9a8 100644
--- a/property.te
+++ b/property.te
@@ -8,6 +8,7 @@
type rild_prop, property_type;
type ctl_bootanim_prop, property_type;
type ctl_default_prop, property_type;
+type ctl_dhcp_pan_prop, property_type;
type ctl_dumpstate_prop, property_type;
type ctl_fuse_prop, property_type;
type ctl_mdnsd_prop, property_type;
@@ -17,4 +18,5 @@
type logd_prop, property_type;
type security_prop, property_type;
type bluetooth_prop, property_type;
+type pan_result_prop, property_type;
type powerctl_prop, property_type;
diff --git a/property_contexts b/property_contexts
index 4640d56..76dcbc4 100644
--- a/property_contexts
+++ b/property_contexts
@@ -25,6 +25,7 @@
service. u:object_r:system_prop:s0
wlan. u:object_r:system_prop:s0
dhcp. u:object_r:system_prop:s0
+dhcp.bt-pan.result u:object_r:pan_result_prop:s0
bluetooth. u:object_r:bluetooth_prop:s0
debug. u:object_r:debug_prop:s0
@@ -57,4 +58,5 @@
ctl.mdnsd u:object_r:ctl_mdnsd_prop:s0
ctl.ril-daemon u:object_r:ctl_rildaemon_prop:s0
ctl.bugreport u:object_r:ctl_bugreport_prop:s0
+ctl.dhcpcd_bt-pan u:object_r:ctl_dhcp_pan_prop:s0
ctl. u:object_r:ctl_default_prop:s0
diff --git a/system_server.te b/system_server.te
index a3a3cd1..236f4c4 100644
--- a/system_server.te
+++ b/system_server.te
@@ -277,6 +277,7 @@
# ctl interface
allow system_server ctl_default_prop:property_service set;
+allow system_server ctl_dhcp_pan_prop:property_service set;
allow system_server ctl_bugreport_prop:property_service set;
# Create a socket for receiving info from wpa.