From b8ec57b93674c70a51385d8be2e3574138d4a2e8 Mon Sep 17 00:00:00 2001 From: wangchen Date: Thu, 4 Sep 2025 22:10:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=94=A8=E6=9B=B4=E6=96=B0=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20close=20#ICWGAJ=20Signed-off-by:=20wangchen=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/cpp/src/service/policy_info_manager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/sandbox_manager/main/cpp/src/service/policy_info_manager.cpp b/services/sandbox_manager/main/cpp/src/service/policy_info_manager.cpp index 5171ae0..9b2537b 100644 --- a/services/sandbox_manager/main/cpp/src/service/policy_info_manager.cpp +++ b/services/sandbox_manager/main/cpp/src/service/policy_info_manager.cpp @@ -1229,6 +1229,10 @@ static sptr GetBundleMgrsa() return iface_cast(bundleMgrSa); } +std::map> DEC_PATH_MAP = { + {"ohos.permission.SANDBOX_ACCESS_MANAGER", {"/storage/Users/currentUser/appdata"}} +}; + int32_t PolicyInfoManager::CleanPolicyByPackageChanged(const std::string &bundleName, int32_t userID) { auto bundleMgr = GetBundleMgrsa(); @@ -1246,7 +1250,7 @@ int32_t PolicyInfoManager::CleanPolicyByPackageChanged(const std::string &bundle SANDBOXMANAGER_LOG_INFO(LABEL, "get appindex size = %{public}zu", appIndexes.size()); appIndexes.emplace_back(0); - std::map> decPathMap = GetDecPathMap(); + std::map> decPathMap = DEC_PATH_MAP; for (int32_t appIndex : appIndexes) { uint32_t tokenId = Security::AccessToken::AccessTokenKit::GetHapTokenID(userID, bundleName, appIndex); if (tokenId == Security::AccessToken::INVALID_TOKENID) { -- Gitee