daemon: Using pid as appid for clients which are not tizen applications
authorAmarnath Valluri <amarnath.valluri@linux.intel.com>
Tue, 5 Nov 2013 08:25:02 +0000 (10:25 +0200)
committerAmarnath Valluri <amarnath.valluri@linux.intel.com>
Thu, 7 Nov 2013 15:03:55 +0000 (17:03 +0200)
daemon/dbus-manager.c

index 578852e..d6d4794 100644 (file)
@@ -246,10 +246,9 @@ _get_app_id_from_connection (GDBusConnection *connection)
     if ((res = aul_app_get_appid_bypid (peer_pid, app_id, sizeof(app_id))) == AUL_R_OK) {
         return g_strdup (app_id);
     }
-    else {
-        WARN ("Fail to get appid of peer pid '%d', error : %d, considering pid as app_id", peer_pid, res);
-        return g_strdup_printf ("%d", peer_pid);
-    }
+    WARN ("Fail to get appid of peer pid '%d', error : %d, considering pid as app_id", peer_pid, res);
+
+    return g_strdup_printf ("%d", peer_pid);
 
     return NULL;
 }
@@ -312,8 +311,8 @@ msgport_dbus_manager_get_app_id (MsgPortDbusManager *dbus_manager)
 gboolean
 msgport_dbus_manager_validate_peer_certificate (MsgPortDbusManager *dbus_manager, const gchar *peer_app_id)
 {
-    int res ;
-    pkgmgrinfo_cert_compare_result_type_e compare_result;
+    //int res ;
+    //pkgmgrinfo_cert_compare_result_type_e compare_result;
     gboolean is_valid_cert = FALSE;
 
     /* check if the source application has no certificate info */
@@ -323,7 +322,7 @@ msgport_dbus_manager_validate_peer_certificate (MsgPortDbusManager *dbus_manager
     /* check if we have cached status */
     if (g_hash_table_contains (dbus_manager->priv->peer_certs, peer_app_id))
         return ((gboolean)(glong)g_hash_table_lookup (dbus_manager->priv->peer_certs, peer_app_id));
-
+#if 0
     if ((res = pkgmgrinfo_pkginfo_compare_app_cert_info (dbus_manager->priv->app_id,
                     peer_app_id, &compare_result)) != PMINFO_R_OK) {
         WARN ("Fail to compare certificates of applications('%s', '%s') : error %d", 
@@ -338,7 +337,7 @@ msgport_dbus_manager_validate_peer_certificate (MsgPortDbusManager *dbus_manager
 
     is_valid_cert = (compare_result == PMINFO_CERT_COMPARE_MATCH) ;
     g_hash_table_insert (dbus_manager->priv->peer_certs, g_strdup (peer_app_id), (gpointer)is_valid_cert);
-
+#endif
     return is_valid_cert;
 }