Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6cdbac6f authored by Mohamad Ayyash's avatar Mohamad Ayyash Committed by Amit Pundir
Browse files

ANDROID: netfilter: xt_qtaguid: Don't show empty tag stats for unprivileged uids



BUG: 27577101
BUG: 27532522
Change-Id: Ibee3c5d224f139b9312a40acb203e87aa7060797
Signed-off-by: default avatarMohamad Ayyash <mkayyash@google.com>
parent f20252d7
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1946,7 +1946,7 @@ static int qtaguid_ctrl_proc_show(struct seq_file *m, void *v)
			);
		f_count = atomic_long_read(
			&sock_tag_entry->socket->file->f_count);
		seq_printf(m, "sock=%p tag=0x%llx (uid=%u) pid=%u "
		seq_printf(m, "sock=%pK tag=0x%llx (uid=%u) pid=%u "
			   "f_count=%lu\n",
			   sock_tag_entry->sk,
			   sock_tag_entry->tag, uid,
@@ -2548,8 +2548,7 @@ static int pp_stats_line(struct seq_file *m, struct tag_stat *ts_entry,
	uid_t stat_uid = get_uid_from_tag(tag);
	struct proc_print_info *ppi = m->private;
	/* Detailed tags are not available to everybody */
	if (get_atag_from_tag(tag) && !can_read_other_uid_stats(
						make_kuid(&init_user_ns,stat_uid))) {
	if (!can_read_other_uid_stats(make_kuid(&init_user_ns,stat_uid))) {
		CT_DEBUG("qtaguid: stats line: "
			 "%s 0x%llx %u: insufficient priv "
			 "from pid=%u tgid=%u uid=%u stats.gid=%u\n",