aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_user.c
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2012-01-03 12:25:16 -0500
committerEric Paris <eparis@redhat.com>2012-01-05 18:53:01 -0500
commitfd778461524849afd035679030ae8e8873c72b81 (patch)
tree32a5849c1879413fce0307af304e372eaa8225b4 /net/xfrm/xfrm_user.c
parent69f594a38967f4540ce7a29b3fd214e68a8330bd (diff)
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/xfrm/xfrm_user.c')
-rw-r--r--net/xfrm/xfrm_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 0256b8a0a7cf..71de86698efa 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -2290,7 +2290,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
2290 link = &xfrm_dispatch[type]; 2290 link = &xfrm_dispatch[type];
2291 2291
2292 /* All operations require privileges, even GET */ 2292 /* All operations require privileges, even GET */
2293 if (security_netlink_recv(skb, CAP_NET_ADMIN)) 2293 if (!capable(CAP_NET_ADMIN))
2294 return -EPERM; 2294 return -EPERM;
2295 2295
2296 if ((type == (XFRM_MSG_GETSA - XFRM_MSG_BASE) || 2296 if ((type == (XFRM_MSG_GETSA - XFRM_MSG_BASE) ||