From 296bd575c33c4c26df17f07b33fabdd96f1280e6 Mon Sep 17 00:00:00 2001 From: liumingyue Date: Tue, 22 Oct 2024 15:57:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dinner=5Fbundle=5Finfo=20uid?= =?UTF-8?q?=20&=20gid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liumingyue --- services/bundlemgr/include/inner_bundle_info.h | 14 -------------- services/bundlemgr/src/inner_bundle_info.cpp | 4 ++-- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/services/bundlemgr/include/inner_bundle_info.h b/services/bundlemgr/include/inner_bundle_info.h index 73ff3f497..6c66b0a10 100644 --- a/services/bundlemgr/include/inner_bundle_info.h +++ b/services/bundlemgr/include/inner_bundle_info.h @@ -774,11 +774,6 @@ public: { baseApplicationInfo_->cacheDir = cacheDir; } - /** - * @brief Set application uid. - * @param uid Indicates the uid to be set. - */ - void SetUid(int uid) {} int32_t GetUid(int32_t userId = Constants::UNSPECIFIED_USERID, int32_t appIndex = 0) const { @@ -814,11 +809,6 @@ public: return innerBundleUserInfo.gids[0]; } - /** - * @brief Set application gid. - * @param gid Indicates the gid to be set. - */ - void SetGid(int gid) {} /** * @brief Get application AppType. * @return Returns the AppType. @@ -1098,8 +1088,6 @@ public: void RestoreFromOldInfo(const InnerBundleInfo &oldInfo) { SetAppCodePath(oldInfo.GetAppCodePath()); - SetUid(oldInfo.GetUid()); - SetGid(oldInfo.GetGid()); } void RestoreModuleInfo(const InnerBundleInfo &oldInfo) { @@ -2261,8 +2249,6 @@ private: // using for get Constants::AppType appType_ = Constants::AppType::THIRD_PARTY_APP; - int uid_ = Constants::INVALID_UID; - int gid_ = ServiceConstants::INVALID_GID; int userId_ = Constants::DEFAULT_USERID; BundleStatus bundleStatus_ = BundleStatus::ENABLED; std::shared_ptr baseApplicationInfo_; diff --git a/services/bundlemgr/src/inner_bundle_info.cpp b/services/bundlemgr/src/inner_bundle_info.cpp index 7b9418103..b237b7244 100644 --- a/services/bundlemgr/src/inner_bundle_info.cpp +++ b/services/bundlemgr/src/inner_bundle_info.cpp @@ -1429,8 +1429,8 @@ void InnerBundleInfo::BuildDefaultUserInfo() baseApplicationInfo_->bundleName.c_str()); InnerBundleUserInfo defaultInnerBundleUserInfo; defaultInnerBundleUserInfo.bundleUserInfo.userId = GetUserId(); - defaultInnerBundleUserInfo.uid = uid_; - defaultInnerBundleUserInfo.gids.emplace_back(gid_); + defaultInnerBundleUserInfo.uid = Constants::INVALID_UID; + defaultInnerBundleUserInfo.gids.emplace_back(ServiceConstants::INVALID_GID); defaultInnerBundleUserInfo.installTime = baseBundleInfo_->installTime; defaultInnerBundleUserInfo.updateTime = baseBundleInfo_->updateTime; defaultInnerBundleUserInfo.bundleName = baseApplicationInfo_->bundleName;