empty PID means no PID filtering
Change-Id: If4b5731c8ae3f9111692dd50581752328562b2b9
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
ai->tgid = 0;
break;
case AT_PID: {
- u32 tgid;
- ret = str_to_u32(ta_id, &tgid);
- if (ret) {
- print_err("converting string to PID, str='%s'\n", ta_id);
- goto free_ai;
+ u32 tgid = 0;
+
+ if (*ta_id != '\0') {
+ ret = str_to_u32(ta_id, &tgid);
+ if (ret) {
+ print_err("converting string to PID, "
+ "str='%s'\n", ta_id);
+ goto free_ai;
+ }
}
ai->tgid = tgid;
switch (app_info->app_type) {
case AT_PID:
+ if (app_info->tgid == 0)
+ goto pf_dentry;
+
*pfg = get_pf_group_by_tgid(app_info->tgid, dentry);
break;
case AT_TIZEN_NATIVE_APP:
case AT_COMMON_EXEC:
+ pf_dentry:
*pfg = get_pf_group_by_dentry(dentry, dentry);
break;
default: