Fix (run application with) xwalk-launcher 25/26025/1 accepted/tizen/common/20140814.150935 submit/tizen_common/20140814.134251 submit/tizen_ivi/20140818.000000 submit/tizen_ivi/20140818.000001 submit/tizen_ivi/20140818.000002 submit/tizen_ivi/20140822.000000
authorSabera Djelti (sdi2) <sabera.djelti@open.eurogiciel.org>
Wed, 13 Aug 2014 11:25:37 +0000 (13:25 +0200)
committerSabera Djelti (sdi2) <sabera.djelti@open.eurogiciel.org>
Thu, 14 Aug 2014 08:14:07 +0000 (10:14 +0200)
Signed-off-by: Sabera Djelti (sdi2) <sabera.djelti@open.eurogiciel.org>
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Change-Id: I21026c7ff3d917562c37085bd5df9e8a167b36fe

CMakeLists.txt
packaging/ail.spec
src/ail_db.c

index 1f951eb..2c3fafe 100644 (file)
@@ -33,7 +33,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
 
 INCLUDE(FindPkgConfig)
 
-pkg_check_modules(LPKGS REQUIRED glib-2.0 sqlite3 dlog db-util xdgmime vconf libtzplatform-config)
+pkg_check_modules(LPKGS REQUIRED glib-2.0 sqlite3 dlog db-util xdgmime vconf libtzplatform-config libsmack)
 STRING(REPLACE ";" " " EXTRA_CFLAGS "${LPKGS_CFLAGS}")
 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
 
index c886865..6f1dd8f 100755 (executable)
@@ -10,6 +10,7 @@ BuildRequires:  cmake
 BuildRequires:  vconf-keys-devel
 BuildRequires:  pkgconfig(db-util)
 BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(libsmack)
 BuildRequires:  pkgconfig(sqlite3)
 BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(xdgmime)
index df5fc64..df285da 100755 (executable)
@@ -29,6 +29,7 @@
 #include <glib.h>
 #include <grp.h>
 #include <pwd.h>
+#include <sys/smack.h>
 #include <sys/stat.h>
 #include "ail_private.h"
 #include "ail_db.h"
@@ -192,7 +193,14 @@ static char* ail_get_app_DB(uid_t uid)
                        strerror_r(errno, buf, sizeof(buf));
                        _E("FAIL : chown %s %d.%d, because %s", dir + 1, uid, grpinfo->gr_gid, buf);
                }
-       }       
+    /* chsmack */
+    if(smack_setlabel(result_psswd, "_", SMACK_LABEL_ACCESS))
+         {
+                 _E("failed chsmack -a \"_\" %s", result_psswd);
+         } else {
+                 _D("chsmack -a \"_\" %s", result_psswd);
+         }
+       }
        return result_psswd;
 }