Add to mount lib directory for rpk
[platform/core/appfw/launchpad.git] / src / launchpad-process-pool / loader_mount.cc
index b31bb11..b6414de 100644 (file)
@@ -217,7 +217,8 @@ void LoaderMount::HandleSigchld(pid_t pid) {
 
 int LoaderMount::Mount(pid_t pid, const AppInfo* app_info) {
   auto& b = app_info->GetBundle();
-  if (b.GetType(kAulMountGadgetPaths) == BUNDLE_TYPE_NONE) return 0;
+  if (b.GetType(kAulMountGadgetPaths) == BUNDLE_TYPE_NONE &&
+      b.GetType(kAulMountLibDir) == BUNDLE_TYPE_NONE) return 0;
 
   tizen_base::Parcel parcel;
   Request request(pid, b);
@@ -313,7 +314,12 @@ int LoaderMount::ProcessRequests() {
     Request request(&parcel);
     ret = ChangeMountNamespace(request.GetPid());
     if (ret == 0) {
-      ret = Util::MountGadgetDirectories(request.GetBundle());
+      auto& b = request.GetBundle();
+      if (b.GetType(kAulMountGadgetPaths) != BUNDLE_TYPE_NONE)
+        ret |= Util::MountGadgetDirectories(b);
+      if (b.GetType(kAulMountLibDir) != BUNDLE_TYPE_NONE)
+        ret |= Util::MountLibraryDirectories(b);
+
       ChangeMountNamespace(launchpad_ppid_);
     }