Revert "Remove setting RES_PKGIDS environment variable" 43/306143/1
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 16 Feb 2024 08:31:25 +0000 (17:31 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 16 Feb 2024 08:31:31 +0000 (17:31 +0900)
This reverts commit cac055ccedcb861b2b7397ad19aad55bc56b5e66.

Change-Id: I92f2e9e5dacc49a2a792e2428424d254014507d5

src/lib/launchpad-common/aul_keys.hh
src/lib/launchpad-glib/util.cc

index de54fbf..b923aa4 100644 (file)
@@ -40,6 +40,7 @@ constexpr const char kAulLoaderName[] = "__AUL_LOADER_NAME__";
 constexpr const char kAulLoaderPath[] = "__AUL_LOADER_PATH__";
 constexpr const char kAulMountAllowedResDir[] = "__AUL_MOUNT_ALLOWED_RES_DIR__";
 constexpr const char kAulMountGlobalResDir[] =  "__AUL_MOUNT_GLOBAL_RES_DIR__";
+constexpr const char kAulMountResPkgIds[] = "__AUL_MOUNT_RES_PKGIDS__";
 constexpr const char kAulMultipleInstanceAppId[] =
     "__AUL_MULTIPLE_INSTANCE_APPID__";
 constexpr const char kAulOrgCallerPid[] = "__AUL_ORG_CALLER_PID__";
index 0cf50c4..b5861f6 100644 (file)
@@ -468,6 +468,19 @@ int Util::MountResourceDirectories(const AppInfo* app_info) {
   if (!allowed_res_dir.empty())
     MountDirectories(allowed_res_dir, root_path + "/res/mount/allowed");
 
+  auto res_pkgids = b.GetStringArray(kAulMountResPkgIds);
+  if (!res_pkgids.empty()) {
+    std::string pkgids;
+    for (auto& pkgid : res_pkgids) {
+      if (!pkgids.empty())
+        pkgids += ":";
+
+      pkgids += pkgid;
+    }
+
+    setenv("RES_PKGIDS", pkgids.c_str(), 1);
+  }
+
   return 0;
 }