Modify the dbus rules to access the bluetoothd
authorWu zheng <wu.zheng@intel.com>
Wed, 23 Oct 2013 03:07:48 +0000 (11:07 +0800)
committerWu Zheng <wu.zheng@intel.com>
Thu, 12 Dec 2013 09:51:34 +0000 (04:51 -0500)
Author: DoHyun Pyun <dh79.pyun@samsung.com>

We should allow to access only about the permitted user or interface

Change-Id: I826f25c466962325721f6734a4d4d7706ba3a651

src/bluetooth.conf

index 0495200..9a8562e 100644 (file)
   <policy user="root">
     <allow own="org.bluez"/>
     <allow send_destination="org.bluez"/>
+    <allow own="org.projectx.bluetooth"/>
+    <allow send_interface="org.projectx.bluetooth"/>
+    <allow send_destination="org.projectx.bluetooth"/>
+    <allow own="org.bluez.frwk_agent"/>
+    <allow send_interface="org.bluez.frwk_agent"/>
+    <allow send_destination="org.bluez.frwk_agent"/>
+    <allow own="org.bluez.Agent1"/>
     <allow send_interface="org.bluez.Agent1"/>
+    <allow send_destination="org.bluez.Agent1"/>
+    <allow own="org.bluez.Adapter1"/>
+    <allow send_interface="org.bluez.Adapter1"/>
+    <allow send_destination="org.bluez.Adapter1"/>
+    <allow own="org.bluez.Manager"/>
+    <allow send_interface="org.bluez.Manager"/>
+    <allow send_destination="org.bluez.Manager"/>
+    <allow own="org.bluez.Device1"/>
+    <allow send_interface="org.bluez.Device1"/>
+    <allow send_destination="org.bluez.Device1"/>
+    <allow own="org.bluez.MediaEndpoint1"/>
     <allow send_interface="org.bluez.MediaEndpoint1"/>
+    <allow send_destination="org.bluez.MediaEndpoint1"/>
+    <allow own="org.bluez.MediaPlayer1"/>
     <allow send_interface="org.bluez.MediaPlayer1"/>
-    <allow send_interface="org.bluez.ThermometerWatcher1"/>
-    <allow send_interface="org.bluez.AlertAgent1"/>
+    <allow send_destination="org.bluez.MediaPlayer1"/>
+    <allow own="org.bluez.Profile1"/>
     <allow send_interface="org.bluez.Profile1"/>
-    <allow send_interface="org.bluez.HeartRateWatcher1"/>
-    <allow send_interface="org.bluez.CyclingSpeedWatcher1"/>
+    <allow send_destination="org.bluez.Profile1"/>
   </policy>
 
   <policy at_console="true">
     <allow send_destination="org.bluez"/>
   </policy>
 
-  <!-- allow users of lp group (printing subsystem) to 
+  <!-- allow users of bt_use group (Tizen BT group) to
+       communicate with bluetoothd -->
+  <policy group="bt_use">
+    <allow send_interface="org.projectx.bluetooth"/>
+    <allow send_destination="org.projectx.bluetooth"/>
+    <allow send_interface="org.bluez.frwk_agent"/>
+    <allow send_destination="org.bluez.frwk_agent"/>
+    <allow send_interface="org.bluez.Agent1"/>
+    <allow send_destination="org.bluez.Agent1"/>
+    <allow send_interface="org.bluez.Adapter1"/>
+    <allow send_destination="org.bluez.Adapter1"/>
+    <allow send_interface="org.bluez.Manager"/>
+    <allow send_destination="org.bluez.Manager"/>
+    <allow send_interface="org.bluez.Device1"/>
+    <allow send_destination="org.bluez.Device1"/>
+    <allow send_interface="org.bluez.MediaEndpoint1"/>
+    <allow send_destination="org.bluez.MediaEndpoint1"/>
+    <allow send_interface="org.bluez.MediaPlayer1"/>
+    <allow send_destination="org.bluez.MediaPlayer1"/>
+    <allow send_interface="org.bluez.Profile1"/>
+    <allow send_destination="org.bluez.Profile1"/>
+  </policy>
+
+  <!-- allow users of lp group (printing subsystem) to
        communicate with bluetoothd -->
   <policy group="lp">
     <allow send_destination="org.bluez"/>
   </policy>
 
   <policy context="default">
-    <deny send_destination="org.bluez"/>
+    <deny send_interface="org.projectx.bluetooth"/>
+    <deny send_destination="org.projectx.bluetooth"/>
+    <deny send_interface="org.bluez.frwk_agent"/>
+    <deny send_destination="org.bluez.frwk_agent"/>
+    <deny send_interface="org.bluez.Agent1"/>
+    <deny send_destination="org.bluez.Agent1"/>
+    <deny send_interface="org.bluez.Adapter1"/>
+    <deny send_destination="org.bluez.Adapter1"/>
+    <deny send_interface="org.bluez.Manager"/>
+    <deny send_destination="org.bluez.Manager"/>
+    <deny send_interface="org.bluez.Device1"/>
+    <deny send_destination="org.bluez.Device1"/>
+    <deny send_interface="org.bluez.MediaEndpoint1"/>
+    <deny send_destination="org.bluez.MediaEndpoint1"/>
+    <deny send_interface="org.bluez.MediaPlayer1"/>
+    <deny send_destination="org.bluez.MediaPlayer1"/>
+    <deny send_interface="org.bluez.Profile1"/>
+    <deny send_destination="org.bluez.Profile1"/>
   </policy>
 
 </busconfig>