Fix smack labeling for lib rpk
[platform/core/appfw/app-installers.git] / src / common / shared_dirs.cc
index ba17ea7..88fd0ba 100644 (file)
@@ -543,8 +543,8 @@ bool CreatePerUserStorageDirectories(const std::string& pkgid, bool trusted,
   }
 
   std::string error_message;
-  if (!RegisterSecurityContextForPath(pkgid, skel_apps_rw / pkgid,
-          kGlobalUserUid, is_readonly, &error_message)) {
+  if (!RegisterSecurityContextForPath(pkgid, {}, skel_apps_rw / pkgid,
+      kGlobalUserUid, is_readonly, &error_message)) {
     LOG(ERROR) << "Failed to register security context for path: "
                << skel_apps_rw / pkgid << ", error_message: " << error_message;
     return false;
@@ -588,8 +588,8 @@ bool CreatePerUserStorageDirectories(const std::string& pkgid, bool trusted,
         }
       }
 
-      if (!RegisterSecurityContextForPath(pkgid, apps_rw / pkgid, uid, false,
-                                          &error_message)) {
+      if (!RegisterSecurityContextForPath(pkgid, {}, apps_rw / pkgid, uid,
+          false, &error_message)) {
         LOG(ERROR) << "Failed to register security context for path: "
                    << apps_rw / pkgid << ", error_message: " << error_message;
         return false;
@@ -664,8 +664,8 @@ bool CreateStorageDirectories(const boost::filesystem::path& path,
   }
 
   std::string error_message;
-  if (!RegisterSecurityContextForPath(pkgid, path / pkgid, uid, false,
-                                      &error_message)) {
+  if (!RegisterSecurityContextForPath(pkgid, {}, path / pkgid, uid, false,
+      &error_message)) {
     LOG(ERROR) << "Failed to register security context for path: " << path
                << ", error_message: " << error_message;
     return false;
@@ -855,8 +855,8 @@ bool CreateSharedDataDir(const std::string& pkgid, uid_t uid) {
 
   bf::path path = apps_rw / pkgid;
   std::string error_message;
-  if (!ci::RegisterSecurityContextForPath(pkgid, path, uid, false,
-          &error_message)) {
+  if (!ci::RegisterSecurityContextForPath(pkgid, {}, path, uid, false,
+      &error_message)) {
     LOG(ERROR) << "Failed to register security context for path: " << path
                << ", error_message: " << error_message;
     return false;
@@ -874,8 +874,8 @@ bool CreatePerUserSharedDataDir(const std::string& pkgid) {
     return false;
 
   std::string error_message;
-  if (!ci::RegisterSecurityContextForPath(pkgid, skel_apps_rw / pkgid,
-          kGlobalUserUid, false, &error_message)) {
+  if (!ci::RegisterSecurityContextForPath(pkgid, {}, skel_apps_rw / pkgid,
+      kGlobalUserUid, false, &error_message)) {
     LOG(ERROR) << "Failed to register security context for path: "
                << skel_apps_rw / pkgid << ", error_message: " << error_message;
     return false;
@@ -905,7 +905,7 @@ bool CreatePerUserSharedDataDir(const std::string& pkgid) {
           return false;
       }
 
-      if (!ci::RegisterSecurityContextForPath(pkgid, apps_rw / pkgid, uid,
+      if (!ci::RegisterSecurityContextForPath(pkgid, {}, apps_rw / pkgid, uid,
                                               false, &error_message)) {
         LOG(ERROR) << "Failed to register security context for path: "
                    << apps_rw / pkgid << ", error_message: " << error_message;
@@ -993,7 +993,7 @@ bool RestoreSharedDataDir(const std::string& pkgid, uid_t uid) {
   }
 
   std::string error_message;
-  if (!RegisterSecurityContextForPath(pkgid, apps_rw / pkgid, uid, false,
+  if (!RegisterSecurityContextForPath(pkgid, {}, apps_rw / pkgid, uid, false,
                                       &error_message)) {
     LOG(ERROR) << "Failed to register security context for path: " << apps_rw
                << ", error_message: " << error_message;
@@ -1034,8 +1034,8 @@ bool RestorePerUserSharedDataDir(const std::string& pkgid) {
           return false;
       }
 
-      if (!RegisterSecurityContextForPath(pkgid, apps_rw / pkgid, uid,
-              false, &error_message)) {
+      if (!RegisterSecurityContextForPath(pkgid, {}, apps_rw / pkgid, uid,
+          false, &error_message)) {
         LOG(ERROR) << "Failed to register security context for path: "
                    << apps_rw / pkgid << ", error_message: " << error_message;
         return false;