From: Zofia Abramowska Date: Fri, 24 Jun 2016 11:01:49 +0000 (+0200) Subject: Fix wrong tizen2X apps fetching on app uninstall X-Git-Tag: accepted/tizen/common/20160703.130059~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dabc378474e8d225eb0cd7a36919661912a31736;p=platform%2Fcore%2Fsecurity%2Fsecurity-manager.git Fix wrong tizen2X apps fetching on app uninstall Change-Id: I9fea05b7c765b0bd9e36cf9d6f211f0f225b245e --- diff --git a/src/common/service_impl.cpp b/src/common/service_impl.cpp index 085c3a8..d7ed40e 100644 --- a/src/common/service_impl.cpp +++ b/src/common/service_impl.cpp @@ -595,10 +595,6 @@ int ServiceImpl::appUninstall(const Credentials &creds, app_inst_req &&req) PrivilegeDb::getInstance().GetPrivateSharingForOwner(req.appName, asOwnerSharing); PrivilegeDb::getInstance().GetPrivateSharingForTarget(req.appName, asTargetSharing); - // if uninstalled app is targetted to Tizen 2.X, remove other 2.X apps RO rules it's shared dir - if (isTizen2XVersion(req.tizenVersion)) - getTizen2XApps(tizen2XpkgsApps); - for (const auto &targetPathsInfo : asOwnerSharing) { const auto &targetAppName = targetPathsInfo.first; const auto &paths = targetPathsInfo.second; @@ -632,6 +628,11 @@ int ServiceImpl::appUninstall(const Credentials &creds, app_inst_req &&req) } PrivilegeDb::getInstance().RemoveApplication(req.appName, req.uid, removeApp, removePkg, removeAuthor); + + // if uninstalled app is targetted to Tizen 2.X, remove other 2.X apps RO rules it's shared dir + if (isTizen2XVersion(req.tizenVersion)) + getTizen2XApps(tizen2XpkgsApps); + CynaraAdmin::getInstance().UpdateAppPolicy(smackLabel, cynaraUserStr, std::vector(), isPrivilegePrivacy); PrivilegeDb::getInstance().CommitTransaction(); LogDebug("Application uninstallation commited to database");