diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-05-24 03:10:10 -0400 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-08-15 00:48:06 -0400 |
commit | a7cb5a49bf64ba64864ae16a6be028f8b0d3cc06 (patch) | |
tree | 0874310cc4af6cd0193e15058cb9ff9e7a955065 /net/sctp/proc.c | |
parent | adb37c4c67f807f16beb222028fb3ce9a354dc2b (diff) |
userns: Print out socket uids in a user namespace aware fashion.
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: James Morris <jmorris@namei.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Sridhar Samudrala <sri@us.ibm.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'net/sctp/proc.c')
-rw-r--r-- | net/sctp/proc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sctp/proc.c b/net/sctp/proc.c index 1e2eee88c3ea..dc12febc977a 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c | |||
@@ -216,7 +216,8 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v) | |||
216 | seq_printf(seq, "%8pK %8pK %-3d %-3d %-4d %-5d %5d %5lu ", ep, sk, | 216 | seq_printf(seq, "%8pK %8pK %-3d %-3d %-4d %-5d %5d %5lu ", ep, sk, |
217 | sctp_sk(sk)->type, sk->sk_state, hash, | 217 | sctp_sk(sk)->type, sk->sk_state, hash, |
218 | epb->bind_addr.port, | 218 | epb->bind_addr.port, |
219 | sock_i_uid(sk), sock_i_ino(sk)); | 219 | from_kuid_munged(seq_user_ns(seq), sock_i_uid(sk)), |
220 | sock_i_ino(sk)); | ||
220 | 221 | ||
221 | sctp_seq_dump_local_addrs(seq, epb); | 222 | sctp_seq_dump_local_addrs(seq, epb); |
222 | seq_printf(seq, "\n"); | 223 | seq_printf(seq, "\n"); |
@@ -324,7 +325,8 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v) | |||
324 | assoc->assoc_id, | 325 | assoc->assoc_id, |
325 | assoc->sndbuf_used, | 326 | assoc->sndbuf_used, |
326 | atomic_read(&assoc->rmem_alloc), | 327 | atomic_read(&assoc->rmem_alloc), |
327 | sock_i_uid(sk), sock_i_ino(sk), | 328 | from_kuid_munged(seq_user_ns(seq), sock_i_uid(sk)), |
329 | sock_i_ino(sk), | ||
328 | epb->bind_addr.port, | 330 | epb->bind_addr.port, |
329 | assoc->peer.port); | 331 | assoc->peer.port); |
330 | seq_printf(seq, " "); | 332 | seq_printf(seq, " "); |