From: Jihoon Kim Date: Wed, 17 Jan 2018 06:37:23 +0000 (+0900) Subject: Use secure log to write result for security X-Git-Tag: accepted/tizen/unified/20180228.071746~11^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55ed2236925ea87e03f627bb4acb2be60946d535;p=platform%2Fcore%2Fuifw%2Fvoice-control.git Use secure log to write result for security Change-Id: Icccb67c84d674dfc6b45bb868827486b74266a01 Signed-off-by: Jihoon Kim --- diff --git a/client/vc.c b/client/vc.c index 9d0248c..c942050 100644 --- a/client/vc.c +++ b/client/vc.c @@ -1675,7 +1675,7 @@ static Eina_Bool __vc_notify_result(void *data) vc_info_parser_get_result(&temp_text, &event, NULL, getpid(), vc_cmd_list, false); - SLOG(LOG_INFO, TAG_VCC, "Result info : result text(%s) event(%d)", temp_text, event); + SECURE_SLOG(LOG_INFO, TAG_VCC, "Result info : result text(%s) event(%d)", temp_text, event); vc_cmd_print_list(vc_cmd_list); diff --git a/client/vc_mgr.c b/client/vc_mgr.c index be3cdb4..5e33f6a 100644 --- a/client/vc_mgr.c +++ b/client/vc_mgr.c @@ -1999,7 +1999,7 @@ static void __vc_mgr_notify_all_result(vc_result_type_e result_type) vc_info_parser_get_result(&temp_text, &event, &temp_message, -1, vc_cmd_list, vc_mgr_client_get_exclusive_command(g_vc_m)); - SLOG(LOG_INFO, TAG_VCM, "Result info : result type(%d) result text(%s) event(%d) result_message(%s)", + SECURE_SLOG(LOG_INFO, TAG_VCM, "Result info : result type(%d) result text(%s) event(%d) result_message(%s)", result_type, temp_text, event, temp_message); vc_cmd_print_list(vc_cmd_list); @@ -2092,7 +2092,7 @@ static Eina_Bool __vc_mgr_notify_result(void *data) vc_info_parser_get_result(&temp_text, &event, NULL, getpid(), vc_cmd_list, false); - SLOG(LOG_INFO, TAG_VCM, "Result : result text(%s) event(%d)", temp_text, event); + SECURE_SLOG(LOG_INFO, TAG_VCM, "Result : result text(%s) event(%d)", temp_text, event); vc_cmd_print_list(vc_cmd_list); diff --git a/client/vc_widget.c b/client/vc_widget.c index 6c9f29b..7fd9c4a 100644 --- a/client/vc_widget.c +++ b/client/vc_widget.c @@ -1146,7 +1146,7 @@ static Eina_Bool __vc_widget_notify_result(void *data) vc_info_parser_get_result(&temp_text, &event, NULL, getpid(), vc_cmd_list, false); - SLOG(LOG_DEBUG, TAG_VCW, "Result info : result text(%s) event(%d)", temp_text, event); + SECURE_SLOG(LOG_DEBUG, TAG_VCW, "Result info : result text(%s) event(%d)", temp_text, event); vc_result_cb callback = NULL; void* user_data = NULL; @@ -1195,7 +1195,7 @@ void __vc_widget_cb_result() bool __vc_widget_cb_asr_result(int event, const char* asr_result) { - SLOG(LOG_DEBUG, TAG_VCW, "Result info : result text(%s) event(%d)", asr_result, event); + SECURE_SLOG(LOG_DEBUG, TAG_VCW, "Result info : result text(%s) event(%d)", asr_result, event); vc_asr_result_cb callback = NULL; void* user_data = NULL; diff --git a/server/vcd_server.c b/server/vcd_server.c index d6b6155..6cbc2b9 100755 --- a/server/vcd_server.c +++ b/server/vcd_server.c @@ -425,7 +425,7 @@ static Eina_Bool __vcd_send_selected_result(void *data) int vcd_send_asr_result(vce_asr_result_event_e event, const char* asr_result, void *user_data) { if (NULL != asr_result) { - SLOG(LOG_DEBUG, TAG_VCD, "[Server] ASR result - Event(%d), Text(%s)", event, asr_result); + SECURE_SLOG(LOG_DEBUG, TAG_VCD, "[Server] ASR result - Event(%d), Text(%s)", event, asr_result); vcdc_send_pre_result_to_manager(vcd_client_manager_get_pid(), event, asr_result); } @@ -436,13 +436,13 @@ int vcd_send_nlg_result(const char* nlg_result, void *user_data) { int ret = __vcd_server_launch_manager_app(); if (0 != ret) { - SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to send dialog : mgr_pid(%d), nlg_result(%s)", vcd_client_manager_get_pid(), nlg_result); + SECURE_SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to send dialog : mgr_pid(%d), nlg_result(%s)", vcd_client_manager_get_pid(), nlg_result); return ret; } ret = vcdc_send_dialog(vcd_client_manager_get_pid(), -1, nlg_result, NULL, 0); //0: VC_DIALOG_END if (0 != ret) - SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to send dialog : mgr_pid(%d), nlg_result(%s)", vcd_client_manager_get_pid(), nlg_result); + SECURE_SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to send dialog : mgr_pid(%d), nlg_result(%s)", vcd_client_manager_get_pid(), nlg_result); return ret; } @@ -466,7 +466,7 @@ int vcd_send_result(vce_result_event_e event, int* result_id, int count, const c vc_info_parser_unset_result(vcd_client_manager_get_exclusive()); vcd_client_manager_set_result_text(all_result); - SLOG(LOG_INFO, TAG_VCD, "[Server] Event(%d), Text(%s) Nonfixed(%s) Msg(%s) Result count(%d)", + SECURE_SLOG(LOG_INFO, TAG_VCD, "[Server] Event(%d), Text(%s) Nonfixed(%s) Msg(%s) Result count(%d)", event, all_result, non_fixed_result, msg, count); if (VCD_RECOGNITION_MODE_RESTART_AFTER_REJECT == vcd_client_get_recognition_mode()) { @@ -644,7 +644,7 @@ int vcd_send_result(vce_result_event_e event, int* result_id, int count, const c } if (NULL != nlu_result) { - SLOG(LOG_INFO, TAG_VCD, "[Server] NLU (%s)", nlu_result); + SECURE_SLOG(LOG_INFO, TAG_VCD, "[Server] NLU (%s)", nlu_result); vc_info_parser_set_nlu_result(nlu_result); if (0 == is_action) { vc_cmd_h nlu_cmd; @@ -678,7 +678,7 @@ int vcd_send_result(vce_result_event_e event, int* result_id, int count, const c if (0 == result_count) { /* No result */ if (NULL != all_result) { - SLOG(LOG_DEBUG, TAG_VCD, "[Server] Engine result is no command : %s", all_result); + SECURE_SLOG(LOG_DEBUG, TAG_VCD, "[Server] Engine result is no command : %s", all_result); } else { SLOG(LOG_DEBUG, TAG_VCD, "[Server] Engine result is NULL"); } @@ -894,8 +894,8 @@ int vcd_send_result(vce_result_event_e event, int* result_id, int count, const c #if 0 static void __vcd_server_nlu_result_cb(vce_result_event_e event, const char* nlu_result, void *user_data) { - SLOG(LOG_DEBUG, TAG_VCD, "[Server] NLU result cb - event(%d)", event); - SLOG(LOG_DEBUG, TAG_VCD, "[Server] result (%s)", nlu_result); + SECURE_SLOG(LOG_DEBUG, TAG_VCD, "[Server] NLU result cb - event(%d)", event); + SECURE_SLOG(LOG_DEBUG, TAG_VCD, "[Server] result (%s)", nlu_result); int ret = vc_info_parser_set_nlu_result(nlu_result); if (0 != ret) {