summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormk5004.lee <mk5004.lee@samsung.com>2018-05-30 05:09:47 (GMT)
committermk5004.lee <mk5004.lee@samsung.com>2018-05-31 01:54:20 (GMT)
commita0cb06dec2e36fc1b832bf20c50e3c51ca1e3dc0 (patch)
treec85385a52e7fc7bb0ee58dd38b1a797a74a28d2f
parent981e356e3ab7f3ebdbb27bab69faf9506af5571d (diff)
downloadbadge-a0cb06dec2e36fc1b832bf20c50e3c51ca1e3dc0.zip
badge-a0cb06dec2e36fc1b832bf20c50e3c51ca1e3dc0.tar.gz
badge-a0cb06dec2e36fc1b832bf20c50e3c51ca1e3dc0.tar.bz2
Add privilege filter for badge settingrefs/changes/92/180492/3
Change-Id: I490c36fb57640b86b392c9d60b245ae78dc44577 Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
-rw-r--r--src/badge_setting_service.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/badge_setting_service.c b/src/badge_setting_service.c
index 9a61b7d..4ed5547 100644
--- a/src/badge_setting_service.c
+++ b/src/badge_setting_service.c
@@ -548,6 +548,16 @@ EXPORT_API int badge_setting_insert_package_for_uid(const char *pkgname, uid_t u
/* LCOV_EXCL_STOP */
}
+ pkgmgr_ret = pkgmgrinfo_pkginfo_filter_add_string(handle,
+ PMINFO_PKGINFO_PROP_PACKAGE_PRIVILEGE, BADGE_PRIVILEGE);
+ if (pkgmgr_ret != PMINFO_R_OK) {
+ /* LCOV_EXCL_START */
+ ERR("Failed to add string to pkginfo_filter[%d]", pkgmgr_ret);
+ ret = BADGE_ERROR_FROM_DB;
+ goto out;
+ /* LCOV_EXCL_STOP */
+ }
+
pkgmgr_ret = pkgmgrinfo_pkginfo_filter_add_string(handle, PMINFO_PKGINFO_PROP_PACKAGE_ID, pkgname);
if (pkgmgr_ret != PMINFO_R_OK) {
/* LCOV_EXCL_START */