Revert "Fix incorrect interface name and improve dbus policy" 63/191963/1
authorWootak Jung <wootak.jung@samsung.com>
Fri, 26 Oct 2018 05:46:56 +0000 (05:46 +0000)
committerWootak Jung <wootak.jung@samsung.com>
Fri, 26 Oct 2018 05:46:56 +0000 (05:46 +0000)
This reverts commit fb6c7048cb2a150aebcef0e2821c369e46c5a9ad.

Change-Id: Ia78dd8b41f341441d4c3cbb15bd1450e24dbaf22

bt-api/bt-gatt-service.c
bt-oal/bluez_hal/bluetooth-frwk-gap-agent.conf
bt-oal/bluez_hal/src/bt-hal-gatt-server.c

index 724780e..4d30589 100644 (file)
@@ -1352,7 +1352,7 @@ gboolean __bt_gatt_emit_interface_removed(gchar *object_path, gchar *interface)
        g_variant_builder_add(array_builder, "s", interface);
 
        ret = g_dbus_connection_emit_signal(g_conn, NULL, "/",
-                                       "org.freedesktop.DBus.ObjectManager",
+                                       "org.freedesktop.Dbus.Objectmanager",
                                        "InterfacesRemoved",
                                        g_variant_new("(oas)",
                                        object_path, array_builder),
@@ -1967,7 +1967,7 @@ BT_EXPORT_API int bluetooth_gatt_add_service(const char *svc_uuid,
                GATT_SERV_INTERFACE, inner_builder);
 
        g_dbus_connection_emit_signal(g_conn, NULL, "/",
-                               "org.freedesktop.DBus.ObjectManager",
+                               "org.freedesktop.Dbus.ObjectManager",
                                "InterfacesAdded",
                                g_variant_new("(oa{sa{sv}})",
                                path, builder),
@@ -2097,7 +2097,7 @@ BT_EXPORT_API int bluetooth_gatt_add_new_characteristic(
                        inner_builder);
 
        g_dbus_connection_emit_signal(g_conn, NULL, "/",
-                       "org.freedesktop.DBus.ObjectManager",
+                       "org.freedesktop.Dbus.ObjectManager",
                        "InterfacesAdded",
                        g_variant_new("(oa{sa{sv}})",
                                path, builder),
@@ -2178,7 +2178,7 @@ BT_EXPORT_API int bluetooth_gatt_set_characteristic_value(
                        inner_builder);
 
        g_dbus_connection_emit_signal(g_conn, NULL, "/",
-                       "org.freedesktop.DBus.ObjectManager",
+                       "org.freedesktop.Dbus.ObjectManager",
                        "InterfacesAdded",
                        g_variant_new("(oa{sa{sv}})",
                                char_info->char_path, builder),
@@ -2301,7 +2301,7 @@ BT_EXPORT_API int bluetooth_gatt_add_descriptor(
                                inner_builder);
 
        g_dbus_connection_emit_signal(g_conn, NULL, "/",
-                               "org.freedesktop.DBus.ObjectManager",
+                               "org.freedesktop.Dbus.ObjectManager",
                                "InterfacesAdded",
                                g_variant_new("(oa{sa{sv}})",
                                path, builder),
@@ -2380,7 +2380,7 @@ BT_EXPORT_API int bluetooth_gatt_set_descriptor_value(
                        inner_builder);
 
        g_dbus_connection_emit_signal(g_conn, NULL, "/",
-                       "org.freedesktop.DBus.ObjectManager",
+                       "org.freedesktop.Dbus.ObjectManager",
                        "InterfacesAdded",
                        g_variant_new("(oa{sa{sv}})",
                                desc_info->desc_path, builder),
index 52c610e..aedbd95 100644 (file)
@@ -7,9 +7,9 @@
         <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"/>
+        <allow send_interface="org.freedesktop.DBus.ObjectManager"/>
+        <allow send_interface="org.bluez.GattCharacteristic1"/>
+        <allow send_interface="org.bluez.GattDescriptor1"/>
     </policy>
     <policy group="network_fw">
         <!-- service name(org.bt.frwk.p<pid>) is changeable by pid -->
         <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"/>
+        <allow send_interface="org.freedesktop.DBus.ObjectManager"/>
+        <allow send_interface="org.bluez.GattCharacteristic1"/>
+        <allow send_interface="org.bluez.GattDescriptor1"/>
     </policy>
     <policy context="default">
         <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>
index 3da7597..b2313dd 100644 (file)
@@ -1437,7 +1437,7 @@ gboolean __bt_hal_gatt_emit_interface_removed(gchar *object_path, gchar *interfa
        g_variant_builder_add(array_builder, "s", interface);
 
        ret = g_dbus_connection_emit_signal(g_conn, NULL, "/",
-                       "org.freedesktop.DBus.ObjectManager",
+                       "org.freedesktop.Dbus.Objectmanager",
                        "InterfacesRemoved",
                        g_variant_new("(oas)",
                                object_path, array_builder),
@@ -2053,7 +2053,7 @@ int __bt_hal_add_service_to_dbus(char *app_path, int slot, btgatt_srvc_id_t *srv
                        GATT_SERV_INTERFACE, inner_builder);
 
        ret = g_dbus_connection_emit_signal(g_conn, NULL, "/",
-                       "org.freedesktop.DBus.ObjectManager",
+                       "org.freedesktop.Dbus.ObjectManager",
                        "InterfacesAdded",
                        g_variant_new("(oa{sa{sv}})",
                                path, builder),
@@ -2447,7 +2447,7 @@ static bt_status_t gatt_server_add_characteristic(int slot, int service_handle,
                        inner_builder);
 
        ret = g_dbus_connection_emit_signal(g_conn, NULL, "/",
-                       "org.freedesktop.DBus.ObjectManager",
+                       "org.freedesktop.Dbus.ObjectManager",
                        "InterfacesAdded",
                        g_variant_new("(oa{sa{sv}})",
                                path, builder),
@@ -2613,7 +2613,7 @@ static bt_status_t gatt_server_add_descriptor(int slot, int service_handle, bt_u
                        inner_builder);
 
        g_dbus_connection_emit_signal(g_conn, NULL, "/",
-                       "org.freedesktop.DBus.ObjectManager",
+                       "org.freedesktop.Dbus.ObjectManager",
                        "InterfacesAdded",
                        g_variant_new("(oa{sa{sv}})",
                                path, builder),