net: check kern before calling security subsystem
authorEric Paris <eparis@redhat.com>
Fri, 6 Nov 2009 04:45:52 +0000 (20:45 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Nov 2009 06:18:18 +0000 (22:18 -0800)
commitc84b3268da3b85c9d8a9e504e1001a14ed829e94
tree795b4997f5610cf2e56a57ee5b1e4c2d4ca10188
parent3f378b684453f2a028eda463ce383370545d9cc9
net: check kern before calling security subsystem

Before calling capable(CAP_NET_RAW) check if this operations is on behalf
of the kernel or on behalf of userspace.  Do not do the security check if
it is on behalf of the kernel.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bluetooth/l2cap.c
net/ipv4/af_inet.c
net/ipv6/af_inet6.c