On Tue, Mar 21, 2017 at 1:08 PM, Chenbo Feng
wrote:
> + if (!sk || !sk_fullsock(sk))
> + return overflowuid;
> + kuid = sock_net_uid(sock_net(sk), sk);
> + return from_kuid_munged(current_user_ns(), kuid);
Is current_user_ns() correct in all the contexts you'll wan
On Mon, Mar 20, 2017 at 09:08:56PM -0700, Chenbo Feng wrote:
> From: Chenbo Feng
>
> Returns the owner uid of the socket inside a sk_buff. This is useful to
> perform per-UID accounting of network traffic or per-UID packet
> filtering. The socket need to be a fullsock otherwise overflowuid is
> r
From: Chenbo Feng
Returns the owner uid of the socket inside a sk_buff. This is useful to
perform per-UID accounting of network traffic or per-UID packet
filtering. The socket need to be a fullsock otherwise overflowuid is
returned.
Signed-off-by: Chenbo Feng
---
include/uapi/linux/bpf.h