Use secure log to write result for security 05/167405/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 17 Jan 2018 06:37:23 +0000 (15:37 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 19 Jan 2018 06:03:23 +0000 (06:03 +0000)
Change-Id: Icccb67c84d674dfc6b45bb868827486b74266a01
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
client/vc.c
client/vc_mgr.c
client/vc_widget.c
server/vcd_server.c

index 9d0248c..c942050 100644 (file)
@@ -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);
 
index be3cdb4..5e33f6a 100644 (file)
@@ -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);
 
index 6c9f29b..7fd9c4a 100644 (file)
@@ -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;
index d6b6155..6cbc2b9 100755 (executable)
@@ -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) {