Fix labeling of SECURITY_MANAGER_PATH_RW paths 63/47463/1
authorRafal Krypa <r.krypa@samsung.com>
Thu, 3 Sep 2015 12:20:49 +0000 (14:20 +0200)
committerRafal Krypa <r.krypa@samsung.com>
Thu, 3 Sep 2015 12:22:56 +0000 (14:22 +0200)
- Don't set exec label on executables. Smack label should be set only by
  launcher. Also that exec label was wrong. Apps run with appId-based label,
  not pkgId-based.
- Set transmute attribute. To keep all files in SECURITY_MANAGER_PATH_RW
  labeled with pkgId-based label, directories must be transmutable.

Change-Id: I3ce69ae70796d2d591b57c75bd175c9c3ea99028
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
src/common/smack-labels.cpp

index c01d555..d90abbb 100644 (file)
@@ -135,8 +135,8 @@ void setupPath(const std::string &pkgId, const std::string &path, app_install_pa
     switch (pathType) {
     case SECURITY_MANAGER_PATH_RW:
         label = zoneSmackLabelGenerate(generatePkgLabel(pkgId), zoneId);
-        label_executables = true;
-        label_transmute = false;
+        label_executables = false;
+        label_transmute = true;
         break;
     case SECURITY_MANAGER_PATH_RO:
         label = zoneSmackLabelGenerate(generatePkgROLabel(pkgId), zoneId);