aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-05-24 03:10:10 -0400
committerEric W. Biederman <ebiederm@xmission.com>2012-08-15 00:48:06 -0400
commita7cb5a49bf64ba64864ae16a6be028f8b0d3cc06 (patch)
tree0874310cc4af6cd0193e15058cb9ff9e7a955065 /net/ipv4/tcp_ipv4.c
parentadb37c4c67f807f16beb222028fb3ce9a354dc2b (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/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 42b2a6a73092..642be8a4c6a3 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2382,7 +2382,7 @@ void tcp_proc_unregister(struct net *net, struct tcp_seq_afinfo *afinfo)
2382EXPORT_SYMBOL(tcp_proc_unregister); 2382EXPORT_SYMBOL(tcp_proc_unregister);
2383 2383
2384static void get_openreq4(const struct sock *sk, const struct request_sock *req, 2384static void get_openreq4(const struct sock *sk, const struct request_sock *req,
2385 struct seq_file *f, int i, int uid, int *len) 2385 struct seq_file *f, int i, kuid_t uid, int *len)
2386{ 2386{
2387 const struct inet_request_sock *ireq = inet_rsk(req); 2387 const struct inet_request_sock *ireq = inet_rsk(req);
2388 int ttd = req->expires - jiffies; 2388 int ttd = req->expires - jiffies;
@@ -2399,7 +2399,7 @@ static void get_openreq4(const struct sock *sk, const struct request_sock *req,
2399 1, /* timers active (only the expire timer) */ 2399 1, /* timers active (only the expire timer) */
2400 jiffies_to_clock_t(ttd), 2400 jiffies_to_clock_t(ttd),
2401 req->retrans, 2401 req->retrans,
2402 uid, 2402 from_kuid_munged(seq_user_ns(f), uid),
2403 0, /* non standard timer */ 2403 0, /* non standard timer */
2404 0, /* open_requests have no inode */ 2404 0, /* open_requests have no inode */
2405 atomic_read(&sk->sk_refcnt), 2405 atomic_read(&sk->sk_refcnt),
@@ -2450,7 +2450,7 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i, int *len)
2450 timer_active, 2450 timer_active,
2451 jiffies_to_clock_t(timer_expires - jiffies), 2451 jiffies_to_clock_t(timer_expires - jiffies),
2452 icsk->icsk_retransmits, 2452 icsk->icsk_retransmits,
2453 sock_i_uid(sk), 2453 from_kuid_munged(seq_user_ns(f), sock_i_uid(sk)),
2454 icsk->icsk_probes_out, 2454 icsk->icsk_probes_out,
2455 sock_i_ino(sk), 2455 sock_i_ino(sk),
2456 atomic_read(&sk->sk_refcnt), sk, 2456 atomic_read(&sk->sk_refcnt), sk,