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>
This commit is contained in:
@@ -130,7 +130,7 @@ static int nfnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
const struct nfnetlink_subsystem *ss;
|
||||
int type, err;
|
||||
|
||||
if (security_netlink_recv(skb, CAP_NET_ADMIN))
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
/* All the messages must at least contain nfgenmsg */
|
||||
|
Reference in New Issue
Block a user