" ON pi.package=package_privilege_info.package";
static int _get_filtered_query(pkgmgrinfo_filter_x *filter,
- const char *locale, char **query, GList **bind_params)
+ const char *locale, uid_t uid, char **query, GList **bind_params)
{
int joined = 0;
char buf[MAX_QUERY_LEN] = { '\0' };
len += strlen(" WHERE 1=1 ");
strncat(buf, " WHERE 1=1 ", MAX_QUERY_LEN - len - 1);
for (list = filter->list; list; list = list->next) {
- joined |= __get_filter_condition(list->data, &condition,
+ joined |= __get_filter_condition(list->data, uid, &condition,
bind_params);
if (condition == NULL)
continue;
strncat(query, query_from_clause, MAX_QUERY_LEN - query_len - 1);
query_len += strlen(query_from_clause);
- ret = _get_filtered_query(tmp_filter, locale, &constraints, &bind_params);
+ ret = _get_filtered_query(tmp_filter, locale, uid, &constraints, &bind_params);
if (ret != PMINFO_R_OK) {
LOGE("Failed to get WHERE clause");
goto catch;