ecore_con_local: change location for socket. 54/189354/2
authorHosang Kim <hosang12.kim@samsung.com>
Mon, 17 Sep 2018 07:20:38 +0000 (16:20 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Tue, 18 Sep 2018 04:45:01 +0000 (04:45 +0000)
In Tizen, the security does not allow 1 application to create
socket and other applications to connect to that socket.
All sockets should be created by system daemon or service.
Therefore, we request the E compositor to create sockets for us.
Besides, this patches also change the location of sockets to
avoid smack errors.

@tizen_only

Change-Id: I9ceda7bbd5cb7b06331bb2ced6342f646a2f44fb

src/lib/ecore_con/ecore_con_local.c

index b356883..4b515e1 100644 (file)
@@ -68,10 +68,12 @@ ecore_con_local_path_new(Eina_Bool is_system, const char *name, int port)
 
    if (!is_system)
      {
+        // TIZEN ONLY (20180917): smack issue: change location
         if (port < 0)
-          eina_vpath_resolve_snprintf(buf, sizeof(buf), "(:usr.run:)/.ecore/%s", name);
+          eina_vpath_resolve_snprintf(buf, sizeof(buf), "/run/.efl/.ecore/%s", name);
         else
-          eina_vpath_resolve_snprintf(buf, sizeof(buf), "(:usr.run:)/.ecore/%s/%i", name, port);
+          eina_vpath_resolve_snprintf(buf, sizeof(buf), "/run/.efl/.ecore/%s/%i", name, port);
+        //
 
         return strdup(buf);
      }