From 80123f9687ebd10b6b094ee8b917d25421f25212 Mon Sep 17 00:00:00 2001 From: "zhaoyuan17@huawei.com" Date: Sun, 26 Sep 2021 12:27:20 +0800 Subject: [PATCH] delete check permit Signed-off-by: zhaoyuan17@huawei.com --- services/formmgr/src/form_mgr_service.cpp | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/services/formmgr/src/form_mgr_service.cpp b/services/formmgr/src/form_mgr_service.cpp index 7fb4a8e61f..8f25249579 100644 --- a/services/formmgr/src/form_mgr_service.cpp +++ b/services/formmgr/src/form_mgr_service.cpp @@ -351,26 +351,7 @@ ErrCode FormMgrService::Init() */ bool FormMgrService::CheckFormPermission() { - sptr iBundleMgr = FormBmsHelper::GetInstance().GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("%{public}s, failed to get IBundleMgr.", __func__); - return false; - } - - int32_t uid = IPCSkeleton::GetCallingUid(); - if (!iBundleMgr->CheckIsSystemAppByUid(uid)) { - APP_LOGE("%{public}s fail, form is not system app. uid:%{public}d", __func__, uid); - return false; - } - - std::string bundleName; - bool result = iBundleMgr->GetBundleNameForUid(uid, bundleName); - if (!result || bundleName.empty()) { - APP_LOGE("%{public}s failed, cannot get bundle name by uid:%{public}d", __func__, uid); - return false; - } - - return CheckFormPermission(bundleName); + return true; } bool FormMgrService::CheckFormPermission(const std::string &bundleName) const -- Gitee