Use secure log 76/151176/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 20 Sep 2017 06:43:57 +0000 (15:43 +0900)
committerInHong Han <inhong1.han@samsung.com>
Thu, 21 Sep 2017 02:24:31 +0000 (11:24 +0900)
Change-Id: I332e38ac7c552d524cc0c4cb257d4a6545a56609
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
ism/extras/efl_panel/remote_input.cpp
ism/extras/wayland_immodule/wayland_imcontext.c
ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp

index 5b95789..ee83cb5 100644 (file)
@@ -115,9 +115,9 @@ finish:
 
 static int open_file(const char *file_name) {
     int file_descriptor = -1;
-    char resolved_path[PATH_MAX];
+    char *resolved_path = realpath(file_name, NULL);
 
-    if (realpath(file_name, resolved_path) != NULL && !strcmp(file_name, resolved_path))
+    if (resolved_path && !strcmp(file_name, resolved_path))
         file_descriptor = open(file_name, O_WRONLY | O_NONBLOCK);
 
     return file_descriptor;
@@ -194,7 +194,7 @@ void Remote_Input::exit()
 
     /* Close uinput device */
     if (ioctl(fd_uinput_keyboard, UI_DEV_DESTROY) < 0) {
-        LOGD ( "error destroy\n");
+        LOGD ("error destroy\n");
     }
     close(fd_uinput_keyboard);
 
@@ -252,7 +252,7 @@ _ecore_wl_keymap_update_cb (void *data, int ev_type, void *event)
      for (unsigned int i  = 0; i < REMOTE_KEY_NAMES; i++) {
          if (remote_key_names[i].value >= REMOTE_KEY_TV_POWER) {
              int keycode = keycode_get_from_string((char *)remote_key_names[i].name);
-             LOGD("remote init Key name: %s, key code : %d\n", (char *)remote_key_names[i].name, keycode);
+             SECURE_LOGD("remote init Key name: %s, key code : %d\n", (char *)remote_key_names[i].name, keycode);
 
              if (ioctl(fd_uinput_keyboard, UI_SET_KEYBIT, keycode) < 0) {
                  LOGW ("Fail to register uinput event key\n");
@@ -430,12 +430,12 @@ void Remote_Input::panel_send_uinput_event_for_wheel(UINPUT_DEVICE device, __s32
 
 void Remote_Input::handle_websocket_message(ISE_MESSAGE &message)
 {
-    LOGD("Received message : %s, %s, %s", message.type.c_str(), message.command.c_str() , message.values.at(0).c_str());
+    SECURE_LOGD("Received message : %s, %s, %s", message.type.c_str(), message.command.c_str() , message.values.at(0).c_str());
 
     if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SEND_KEY_EVENT]) == 0) {
         if (message.values.size() == 1) {
             int e = atoi(message.values.at(0).c_str());
-            LOGD("send_key_event key num : %d", e);
+            SECURE_LOGD("send_key_event key num : %d", e);
 
             if (e >= REMOTE_KEY_ENTER && e <= REMOTE_KEY_CANCEL) {
                 _info_manager->remoteinput_forward_key_event(KeyEvent(remote_key_codes[e].code));
@@ -461,7 +461,7 @@ void Remote_Input::handle_websocket_message(ISE_MESSAGE &message)
     }
     else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_COMMIT_STRING]) == 0) {
         if (message.values.size() == 1) {
-            LOGD( "commit_str:|%s|", message.values.at(0).c_str());
+            SECURE_LOGD ("commit_str:|%s|", message.values.at(0).c_str());
             _info_manager->remoteinput_commit_string(utf8_mbstowcs((char*)message.values.at(0).c_str()));
             _info_manager->remoteinput_forward_key_event(KeyEvent(SCIM_KEY_NullKey, SCIM_KEY_ReleaseMask));
         }
@@ -472,7 +472,7 @@ void Remote_Input::handle_websocket_message(ISE_MESSAGE &message)
 
         if (message.values.size() == 2) {
             int caret = atoi(message.values.at(1).c_str());
-            LOGD ("preedit:|%s|, caret = %d", message.values.at(0).c_str(), caret);
+            SECURE_LOGD ("preedit:|%s|, caret = %d", message.values.at(0).c_str(), caret);
             _info_manager->remoteinput_update_preedit_string(utf8_mbstowcs((char*)message.values.at(0).c_str()), attrs, (uint32) caret);
             _info_manager->remoteinput_forward_key_event(KeyEvent(SCIM_KEY_NullKey, SCIM_KEY_ReleaseMask));
         } else {
index 9ae891a..57d5d9a 100644 (file)
@@ -719,7 +719,7 @@ key_down_filter_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
         _input_panel_state == ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW) &&
         check_hide_key(ev->keyname)) {
 
-        LOGD ("%s key is pressed.\n", ev->keyname);
+        SECURE_LOGD ("%s key is pressed.\n", ev->keyname);
 
         Ecore_IMF_Event_Key_Down imf_event;
         Eina_Bool filter_ret = EINA_FALSE;
@@ -731,7 +731,7 @@ key_down_filter_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
         else
             LOGD("no focus\n");
 
-        LOGD ("%s key is pressed. ret : %d\n", ev->keyname, filter_ret);
+        SECURE_LOGD ("%s key is pressed. ret : %d\n", ev->keyname, filter_ret);
         if (filter_ret) {
             return EINA_FALSE; /* the event is removed from the queue */
         }
@@ -758,7 +758,7 @@ key_up_filter_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
         !check_hide_key(ev->keyname))
         return EINA_TRUE; /* the event is kept */
 
-    LOGD ("%s key is released.\n", ev->keyname);
+    SECURE_LOGD ("%s key is released.\n", ev->keyname);
 
     Ecore_IMF_Event_Key_Up imf_event;
     Eina_Bool filter_ret = EINA_FALSE;
@@ -770,7 +770,7 @@ key_up_filter_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
     else
         LOGD("no focus\n");
 
-    LOGD ("%s key is released. ret : %d\n", ev->keyname, filter_ret);
+    SECURE_LOGD ("%s key is released. ret : %d\n", ev->keyname, filter_ret);
     if (filter_ret) {
         return EINA_FALSE; /* the event is removed from the queue */
     }
@@ -2703,7 +2703,6 @@ wayland_im_context_reset(Ecore_IMF_Context *ctx)
 void
 wayland_im_context_focus_in(Ecore_IMF_Context *ctx)
 {
-
     LOGD ("ctx : %p. enable : %d, on demand : %d\n", ctx,
           ecore_imf_context_input_panel_enabled_get(ctx),
           ecore_imf_context_input_panel_show_on_demand_get (ctx));
@@ -3484,7 +3483,7 @@ wayland_im_context_prediction_hint_set (Ecore_IMF_Context *ctx, const char *pred
     imcontext->prediction_hint = strdup(prediction_hint ? prediction_hint : "");
 
     if (imcontext->input && imcontext->text_input) {
-        LOGD ("ctx : %p, prediction_hint : %s\n", ctx, imcontext->prediction_hint);
+        SECURE_LOGD ("ctx : %p, prediction_hint : %s\n", ctx, imcontext->prediction_hint);
         wl_text_input_prediction_hint(imcontext->text_input, imcontext->prediction_hint);
     }
 }
index 084b398..bb74bb0 100644 (file)
@@ -251,7 +251,6 @@ private:
         SCIM_DEBUG_MAIN(4) << __FUNCTION__ << "...\n";
         LOGD ("client id:%d\n", client);
 
-
         Socket client_socket(client);
 
         m_send_trans.clear();
@@ -279,7 +278,6 @@ private:
         SCIM_DEBUG_MAIN(4) << __FUNCTION__ << "...\n";
         LOGD ("client id:%d\n", client);
 
-
         Socket client_socket(client);
 
         m_send_trans.clear();