diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-05-23 19:16:53 -0400 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-08-15 00:47:34 -0400 |
commit | 976d020150456fccbd34103fd117fab910eed09c (patch) | |
tree | 742f67a59f97d5cfdfef2d71094d2b2145553f3d /net/core | |
parent | d04a48b06d63b6d6e9289ca8a5e6e84ebfe39bfd (diff) |
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/core')
-rw-r--r-- | net/core/sock.c | 6 |
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) | |||
1526 | } | 1526 | } |
1527 | EXPORT_SYMBOL(sock_edemux); | 1527 | EXPORT_SYMBOL(sock_edemux); |
1528 | 1528 | ||
1529 | int sock_i_uid(struct sock *sk) | 1529 | kuid_t sock_i_uid(struct sock *sk) |
1530 | { | 1530 | { |
1531 | int uid; | 1531 | kuid_t uid; |
1532 | 1532 | ||
1533 | read_lock_bh(&sk->sk_callback_lock); | 1533 | read_lock_bh(&sk->sk_callback_lock); |
1534 | uid = sk->sk_socket ? SOCK_INODE(sk->sk_socket)->i_uid : 0; | 1534 | uid = sk->sk_socket ? SOCK_INODE(sk->sk_socket)->i_uid : GLOBAL_ROOT_UID; |
1535 | read_unlock_bh(&sk->sk_callback_lock); | 1535 | read_unlock_bh(&sk->sk_callback_lock); |
1536 | return uid; | 1536 | return uid; |
1537 | } | 1537 | } |