summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>2016-05-04 11:26:46 +0200
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2016-05-13 09:07:24 -0700
commit4b71da874cf1f8ec4aaf5d0dc289afce288c635d (patch)
treef90b67f10e57860d0b2cad4022d9f0b795f1ff81
parenta16fdd2243716f5a71a35c06fa3096920dce642e (diff)
downloadsecurity-manager-4b71da874cf1f8ec4aaf5d0dc289afce288c635d.tar.gz
security-manager-4b71da874cf1f8ec4aaf5d0dc289afce288c635d.tar.bz2
security-manager-4b71da874cf1f8ec4aaf5d0dc289afce288c635d.zip
Fix the update of package cross-rules during uninstallation
[Problem] During app uninstallation the package rules are updated basing on the list of apps being a part of the package. However the app being uninstalled is not removed from this list which may generate unwanted smack rules. [Solution] Remove uninstalled app from package contents list. [Verification] Test is not yet implemented. Change-Id: I867e65a996d0c797dfab9bcaaf15bbaf1a4261c4
-rwxr-xr-xsrc/common/service_impl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/service_impl.cpp b/src/common/service_impl.cpp
index ce4e32da..9aaafc57 100755
--- a/src/common/service_impl.cpp
+++ b/src/common/service_impl.cpp
@@ -562,6 +562,7 @@ int ServiceImpl::appUninstall(const Credentials &creds, app_inst_req &&req)
SmackRules::uninstallPackageRules(req.pkgName);
if (!removePkg) {
LogDebug("Recreating Smack rules for pkgName " << req.pkgName);
+ pkgContents.erase(std::remove(pkgContents.begin(), pkgContents.end(),req.appName), pkgContents.end());
SmackRules::updatePackageRules(req.pkgName, pkgContents, allTizen2XApps);
}
}