setenv("LC_IDENTIFICATION", region, 1);
}
+void SetGadgetPkgIdsEnvironments(const tizen_base::Bundle& b) {
+ auto gadget_pkgids = b.GetStringArray(kAulMountGadgetPkgIds);
+ if (gadget_pkgids.empty()) return;
+
+ std::string pkgids;
+ for (auto& pkgid : gadget_pkgids) {
+ if (!pkgids.empty()) pkgids += ":";
+
+ pkgids += pkgid;
+ }
+
+ setenv("GADGET_PKGIDS", pkgids.c_str(), 1);
+}
+
#ifdef TIZEN_FEATURE_SET_PERSONALITY_32
static void SetExecutionDomain() {
int ret = personality(PER_LINUX32);
std::vector<std::string> paths_;
};
-void MountDirectories(const std::vector<std::string>& srcs,
+int MountDirectories(const std::vector<std::string>& srcs,
const std::string& dest) {
std::string opt = "lowerdir=" + dest;
for (auto& src : srcs)
int ret = mount(nullptr, dest.c_str(), "overlay", MS_RDONLY, opt.c_str());
if (ret != 0)
_E("mount() is failed. dest(%s), errno(%d)", dest.c_str(), errno);
+
+ return ret;
}
class ExternalPackage : public DBus {
setenv("GCOV_PREFIX", "/tmp", 1);
setenv("DALI_DISABLE_PARTIAL_UPDATE", "0", 1);
+ SetGadgetPkgIdsEnvironments(b);
}
void Util::DeleteSocketPath(pid_t pid, uid_t uid) {
return 0;
}
+int Util::MountGadgetDirectories(const tizen_base::Bundle& b) {
+ auto gadget_paths = b.GetStringArray(kAulMountGadgetPaths);
+ if (!gadget_paths.empty()) {
+ auto root_path = b.GetString(kAulRootPath);
+ return MountDirectories(gadget_paths, root_path + "/bin");
+ }
+
+ return 0;
+}
+
int Util::WaitTepMount(const AppInfo* app_info) {
if (app_info->GetBundle().GetType(kAulTepPath) == BUNDLE_TYPE_NONE)
return 0;