sync with tizen_3.0 38/113638/5 accepted/tizen/common/20170223.182359 accepted/tizen/ivi/20170223.120443 accepted/tizen/mobile/20170223.120352 accepted/tizen/unified/20170309.031811 accepted/tizen/wearable/20170223.120425 submit/tizen/20170223.020008 submit/tizen_unified/20170308.100404
authorjkjo92 <jkjo92@samsung.com>
Wed, 8 Feb 2017 08:20:47 +0000 (17:20 +0900)
committerjkjo92 <jkjo92@samsung.com>
Wed, 22 Feb 2017 07:02:06 +0000 (16:02 +0900)
Change-Id: I8d9f11394b8791ea9e3596f00118198ce4900089
Signed-off-by: jkjo92 <jkjo92@samsung.com>
client/fido_uaf_client.c
server/fido_asm_plugin_manager.c [changed mode: 0644->0755]
server/fido_selection_ui_adaptor.c [changed mode: 0644->0755]
server/fido_server.c
test/Dummy_ASM_DBUS/dummy_asm_server.c [changed mode: 0644->0755]

index c835904..8a35127 100755 (executable)
@@ -91,10 +91,6 @@ _fido_uaf_process_operation_reply(GObject *object, GAsyncResult *res, gpointer u
        }
 
        _fido_process_cb_data_s *cb_data = (_fido_process_cb_data_s *)user_data;
-       if (cb_data == NULL) {
-               _ERR("Can not proceed since callback data is NULL");
-               return;
-       }
 
        if (cb_data->cb == NULL) {
                _ERR("Can not proceed since callback data's cb part is NULL");
@@ -324,8 +320,6 @@ fido_uaf_set_server_result(int response_code, const char *uaf_response_json)
                return FIDO_ERROR_NOT_SUPPORTED;
        }
 
-       GError *dbus_err = NULL;
-
        int tizen_error_code = FIDO_ERROR_NONE;
 
        _response_t *uaf_res_data = _uaf_parser_parse_uaf_response(uaf_response_json);
@@ -363,9 +357,6 @@ fido_uaf_set_server_result(int response_code, const char *uaf_response_json)
 
        if (is_success == FALSE) {
                _ERR("fido_call_fido_uaf_notify_result_sync failed [%d]", tizen_error_code);
-               if (dbus_err)
-                       _ERR("GError = [%s]", dbus_err->message);
-
                return FIDO_ERROR_PROTOCOL_ERROR;
        }
 
old mode 100644 (file)
new mode 100755 (executable)
index 137ab82..d812e34
@@ -315,10 +315,6 @@ _on_asm_dbus_reply(GObject *proxy, GAsyncResult *res, gpointer user_data)
        }
 
        _asm_ipc_cb_data_t *cb_data = (_asm_ipc_cb_data_t *)user_data;
-       if (cb_data == NULL) {
-               _ERR("Can not proceed since callback data is NULL");
-               return;
-       }
 
        if (cb_data->cb == NULL) {
                _ERR("Can not proceed since callback data's cb part is NULL");
@@ -477,6 +473,6 @@ _asm_ipc_send_sync(const char *asm_id, const char *asm_req)
 
        //g_variant_unref (_ret);
 
-CATCH :
+CATCH:
        return asm_res_json;
 }
old mode 100644 (file)
new mode 100755 (executable)
index 1a7cc94..a7fc435
@@ -427,8 +427,7 @@ __get_proc_path_of_dbus_caller(GDBusMethodInvocation *invocation)
 
        connection = g_dbus_method_invocation_get_connection(invocation);
        if (connection == NULL) {
-               _ERR("Failed to open connection for the invocation [%s]", error->message);
-               g_error_free(error);
+               _ERR("Failed to open connection for the invocation");
                return NULL;
        }
 
index 09bafc1..65b2a2b 100755 (executable)
@@ -914,28 +914,29 @@ _discover_response_cb_for_process(int tz_error_code, int error_code, GList *avai
                                _INFO("_PROCESS_TYPE_CHECK_POLICY for auth");
                        }
 
-                       if (policy->is_keyid_present == true) {
-                               /*Available authenticators' keyIDs can be fetched via GetRegistrations ASM op*/
-                               _INFO("Need to call GetRegistrations to match policy");
-                               GList *avl_auth_list_full_temp = __get_auth_list_with_keyids(policy, available_authenticators);
-                               if (avl_auth_list_full_temp != NULL) {
-                                       g_list_free(available_authenticators_full);
-
-                                       available_authenticators_full = g_list_first(avl_auth_list_full_temp);
-                               }
-
-                       }
-                       GList *allowed_auth_list = _policy_checker_get_matched_auth_list(policy, available_authenticators_full);
-                       g_list_free_full(available_authenticators_full, _free_asm_auth_list);
+                       if (policy != NULL) {
+                               if (policy->is_keyid_present == true) {
+                                       /*Available authenticators' keyIDs can be fetched via GetRegistrations ASM op*/
+                                       _INFO("Need to call GetRegistrations to match policy");
+                                       GList *avl_auth_list_full_temp = __get_auth_list_with_keyids(policy, available_authenticators);
+                                       if (avl_auth_list_full_temp != NULL) {
+                                               g_list_free(available_authenticators_full);
+
+                                               available_authenticators_full = g_list_first(avl_auth_list_full_temp);
+                                       }
 
-                       if ((allowed_auth_list != NULL) && g_list_length(allowed_auth_list) > 0)
-                               _send_process_response(cb_data, FIDO_ERROR_NONE, NULL);
-                       else
-                               _send_process_response(cb_data, FIDO_ERROR_NO_SUITABLE_AUTHENTICATOR, NULL);
+                               }
+                               GList *allowed_auth_list = _policy_checker_get_matched_auth_list(policy, available_authenticators_full);
+                               g_list_free_full(available_authenticators_full, _free_asm_auth_list);
 
-                       if (allowed_auth_list != NULL)
-                               g_list_free_full(allowed_auth_list, _free_matched_auth_data);
+                               if ((allowed_auth_list != NULL) && g_list_length(allowed_auth_list) > 0)
+                                       _send_process_response(cb_data, FIDO_ERROR_NONE, NULL);
+                               else
+                                       _send_process_response(cb_data, FIDO_ERROR_NO_SUITABLE_AUTHENTICATOR, NULL);
 
+                               if (allowed_auth_list != NULL)
+                                       g_list_free_full(allowed_auth_list, _free_matched_auth_data);
+                       }
                } else if (strcmp(cb_data->uaf_req->header->operation, _UAF_OPERATION_NAME_KEY_DE_REG) == 0) {
 
                        _dereg_request_t *dereg_req = (_dereg_request_t*)(cb_data->uaf_req->data);
old mode 100644 (file)
new mode 100755 (executable)
index 183c25f..ad87871
@@ -102,8 +102,7 @@ __get_proc_path_of_dbus_caller(GDBusMethodInvocation *invocation)
 
        connection = g_dbus_method_invocation_get_connection(invocation);
        if (connection == NULL) {
-               _ERR("Failed to open connection for the invocation [%s]", error->message);
-               g_error_free(error);
+               _ERR("Failed to open connection for the invocation");
                return NULL;
        }