security: change to apply Tizen security policy. 86/48286/4 accepted/tizen/mobile/20151005.232507 accepted/tizen/tv/20151005.232524 accepted/tizen/wearable/20151005.232533 submit/tizen/20151005.020432 submit/tizen/20151005.070132
authorJaehwan Kim <jae.hwan.kim@samsung.com>
Thu, 17 Sep 2015 07:00:50 +0000 (16:00 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Mon, 5 Oct 2015 02:09:18 +0000 (19:09 -0700)
Change the path of quicklaunch and set the SMACK rule to the path.

@tizen_feature

Change-Id: I2fd33d81f4b6eab5a0cec6f3bb7ca59ac3a4e5f2

packaging/elementary.conf [new file with mode: 0644]
packaging/elementary.spec
src/bin/run.c

diff --git a/packaging/elementary.conf b/packaging/elementary.conf
new file mode 100644 (file)
index 0000000..50b88e0
--- /dev/null
@@ -0,0 +1,3 @@
+d      /run/.elementary        1770    display users
+t      /run/.elementary        -       -       -       -       security.SMACK64="User::App::Shared"
+t      /run/.elementary        -       -       -       -       security.SMACK64TRANSMUTE="TRUE"
index ded00ce7d104bb1c279b36d1d42fc26e297f7e1f..4cb13291584e8c64f21b4b2e22b3d508842b9d10 100644 (file)
@@ -10,6 +10,7 @@ Summary:        EFL toolkit for small touchscreens
 Url:            http://trac.enlightenment.org/e/wiki/Elementary
 Group:          Graphics & UI Framework/Development
 Source0:        elementary-%{version}.tar.bz2
+Source100:      elementary.conf
 Source1001:     elementary.manifest
 BuildRequires:  doxygen
 BuildRequires:  gettext-devel
@@ -103,6 +104,9 @@ cp %{SOURCE1001} .
 %install
 %make_install
 
+mkdir -p %{buildroot}%{_tmpfilesdir}
+install -m 0644 %SOURCE100 %{buildroot}%{_tmpfilesdir}/elementary.conf
+
 %find_lang %{name}
 
 %post -p /sbin/ldconfig
@@ -122,6 +126,7 @@ cp %{SOURCE1001} .
 %{_libdir}/*.so.*
 %{_datadir}/elementary/*
 %{_datadir}/icons/elementary.png
+%{_tmpfilesdir}/elementary.conf
 
 %exclude %{_datadir}/elementary/config/
 
index a3ad3a4cab586b552945f4e74e437f5dddd02a5a..4cc5b9b1ed8994f161c465a5d3e77a4d463063fa 100644 (file)
@@ -46,7 +46,10 @@ main(int argc, char **argv)
      }
    cwd = strdup(buf);
    if (!(disp = getenv("DISPLAY"))) disp = "unknown";
-   snprintf(buf, sizeof(buf), "/tmp/elm-ql-%i/%s", getuid(), disp);
+   //TIZEN ONLY (150917): security issue. To access any application, it needs smack rule.
+   //snprintf(buf, sizeof(buf), "/tmp/elm-ql-%i/%s", getuid(), disp);
+   snprintf(buf, sizeof(buf), "/run/.elementary/elm-ql-%i/%s", getuid(), disp);
+   //
    if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
      {
         perror("elementary_quicklaunch: socket(AF_UNIX, SOCK_STREAM, 0)");