summaryrefslogtreecommitdiffstats
path: root/net/decnet/netfilter
diff options
context:
space:
mode:
authorEric Paris2012-01-03 18:25:16 +0100
committerEric Paris2012-01-06 00:53:01 +0100
commitfd778461524849afd035679030ae8e8873c72b81 (patch)
tree32a5849c1879413fce0307af304e372eaa8225b4 /net/decnet/netfilter
parentptrace: do not audit capability check when outputing /proc/pid/stat (diff)
downloadkernel-qcow2-linux-fd778461524849afd035679030ae8e8873c72b81.tar.gz
kernel-qcow2-linux-fd778461524849afd035679030ae8e8873c72b81.tar.xz
kernel-qcow2-linux-fd778461524849afd035679030ae8e8873c72b81.zip
security: remove the security_netlink_recv hook as it is equivalent to capable()
Once upon a time netlink was not sync and we had to get the effective capabilities from the skb that was being received. Today we instead get the capabilities from the current task. This has rendered the entire purpose of the hook moot as it is now functionally equivalent to the capable() call. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'net/decnet/netfilter')
-rw-r--r--net/decnet/netfilter/dn_rtmsg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c
index 69975e0bcdea..1531135130db 100644
--- a/net/decnet/netfilter/dn_rtmsg.c
+++ b/net/decnet/netfilter/dn_rtmsg.c
@@ -108,7 +108,7 @@ static inline void dnrmg_receive_user_skb(struct sk_buff *skb)
if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len)
return;
- if (security_netlink_recv(skb, CAP_NET_ADMIN))
+ if (!capable(CAP_NET_ADMIN))
RCV_SKB_FAIL(-EPERM);
/* Eventually we might send routing messages too */