Fix dbus proxy creation code 95/183195/1
authorSangyoon Jang <jeremy.jang@samsung.com>
Tue, 3 Jul 2018 08:28:52 +0000 (17:28 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Tue, 3 Jul 2018 08:28:52 +0000 (17:28 +0900)
Add G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag.
pkgmgr-server does not provide object which has properties.
Without this flag, g_dbus_proxy_new_sync() will try to load properties
using GetAll method, and this call will be denied by default dbus policy.

Change-Id: I77248031e93bf30ea386d5e6b4838129cdc2aaa1
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
client/src/pkgmgr_client_connection.c

index ff27b4f..6e1f2f2 100644 (file)
@@ -264,7 +264,8 @@ int pkgmgr_client_connection_send_request(struct pkgmgr_client_t *pc,
        g_variant_ref_sink(params);
 
        do {
-               proxy = g_dbus_proxy_new_sync(pc->conn, G_DBUS_PROXY_FLAGS_NONE,
+               proxy = g_dbus_proxy_new_sync(pc->conn,
+                               G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
                                NULL, PKGMGR_DBUS_SERVICE,
                                PKGMGR_DBUS_OBJECT_PATH,
                                PKGMGR_DBUS_INTERFACE, NULL, &error);