Fix incorrect interface name and improve dbus policy
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / bluez_hal / bluetooth-frwk-gap-agent.conf
index fb33c3e..52c610e 100644 (file)
@@ -2,16 +2,30 @@
  "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 <busconfig>
     <policy user="root">
-        <allow send_destination="org.projectx.bt" send_interface="org.bluez.Agent1"/>
-       <allow send_interface="org.bluez.Profile1"/>
+        <!-- service name(org.bt.frwk.p<pid>) is changeable by pid -->
+        <allow own_prefix="org.bt.frwk"/>
+        <allow send_interface="org.bluez.Profile1" send_member="NewConnection"/>
+        <allow send_interface="org.bluez.Profile1" send_member="RequestDisconnection"/>
+        <!-- No send_destination because private connection does not have well-known service name -->
+        <allow send_interface="org.freedesktop.DBus.ObjectManager" send_member="GetManagedObjects"/>
+        <allow send_interface="org.bluez.GattCharacteristic1" send_type="method_call"/>
+        <allow send_interface="org.bluez.GattDescriptor1" send_type="method_call"/>
     </policy>
     <policy group="network_fw">
-        <allow send_destination="org.projectx.bt" send_interface="org.bluez.Agent1"/>
-       <allow send_interface="org.bluez.Profile1"/>
+        <!-- service name(org.bt.frwk.p<pid>) is changeable by pid -->
+        <allow own_prefix="org.bt.frwk"/>
+        <allow send_interface="org.bluez.Profile1" send_member="NewConnection"/>
+        <allow send_interface="org.bluez.Profile1" send_member="RequestDisconnection"/>
+        <!-- No send_destination because private connection does not have well-known service name -->
+        <allow send_interface="org.freedesktop.DBus.ObjectManager" send_member="GetManagedObjects"/>
+        <allow send_interface="org.bluez.GattCharacteristic1" send_type="method_call"/>
+        <allow send_interface="org.bluez.GattDescriptor1" send_type="method_call"/>
     </policy>
     <policy context="default">
-        <deny own="org.bluez.Agent1"/>
-        <allow receive_sender="org.bluez.Agent1"/>
-        <check send_destination="org.projectx.bt" send_interface="org.bluez.Agent1" privilege="http://tizen.org/privilege/bluetooth.admin"/>
+        <deny own_prefix="org.bt.frwk"/>
+        <deny send_interface="org.bluez.Profile1" send_member="NewConnection"/>
+        <deny send_interface="org.bluez.Profile1" send_member="RequestDisconnection"/>
+        <deny send_interface="org.bluez.GattCharacteristic1" send_type="method_call"/>
+        <deny send_interface="org.bluez.GattDescriptor1" send_type="method_call"/>
     </policy>
 </busconfig>