From d54008040d6bf5062324558d58aaad966cba2665 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Fri, 29 Jan 2021 15:57:10 +0800 Subject: [PATCH] Always add module itself to scope --- core/src/main/cpp/main/src/config_manager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/main/cpp/main/src/config_manager.cpp b/core/src/main/cpp/main/src/config_manager.cpp index 70f4ad48..91c1a1d2 100644 --- a/core/src/main/cpp/main/src/config_manager.cpp +++ b/core/src/main/cpp/main/src/config_manager.cpp @@ -38,7 +38,7 @@ * Permission: * /data/adb/lspd should be accessible by zygote by sepolicy * /data/misc/$misc_path is random path, and mounted by magisk - * it should have context `u:object_r:shell_data_file:s0`, which should be readable by normal app + * it should have context `u:object_r:magisk_file:s0`, which should be readable by normal app * and zygote * * /data/misc/$misc_path's owner should be root:root, with permission 771 @@ -208,6 +208,7 @@ namespace lspd { while (std::getline(ifs, module)) { const auto &module_pkg_name = GetPackageNameFromBaseApkPath(module); auto &[module_path, scope] = modules_list[module_pkg_name]; + scope.insert(module_pkg_name); // Always add module itself module_path.assign(std::move(module)); const auto &module_scope_conf = GetConfigPath(module_pkg_name + ".conf"); if (!path_exists(module_scope_conf)) { @@ -224,8 +225,6 @@ namespace lspd { if (!app_pkg_name.empty()) scope.emplace(std::move(app_pkg_name)); } - if (!scope.empty()) - scope.insert(module_pkg_name); // Always add module itself if (IsInstaller(module_pkg_name)) scope.erase("android"); LOGI("scope of %s is:\n%s", module_pkg_name.c_str(), ([&scope = scope]() { std::ostringstream join;