summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-05-23 17:16:53 -0600
committerEric W. Biederman <ebiederm@xmission.com>2012-08-14 21:47:34 -0700
commit976d020150456fccbd34103fd117fab910eed09c (patch)
tree742f67a59f97d5cfdfef2d71094d2b2145553f3d /net
parentd04a48b06d63b6d6e9289ca8a5e6e84ebfe39bfd (diff)
downloadlinux-976d020150456fccbd34103fd117fab910eed09c.tar.bz2
userns: Convert sock_i_uid to return a kuid_t
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')
-rw-r--r--net/core/sock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 9c7fe4ff30fc..5c6a435717e0 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1526,12 +1526,12 @@ void sock_edemux(struct sk_buff *skb)
}
EXPORT_SYMBOL(sock_edemux);
-int sock_i_uid(struct sock *sk)
+kuid_t sock_i_uid(struct sock *sk)
{
- int uid;
+ kuid_t uid;
read_lock_bh(&sk->sk_callback_lock);
- uid = sk->sk_socket ? SOCK_INODE(sk->sk_socket)->i_uid : 0;
+ uid = sk->sk_socket ? SOCK_INODE(sk->sk_socket)->i_uid : GLOBAL_ROOT_UID;
read_unlock_bh(&sk->sk_callback_lock);
return uid;
}