aboutsummaryrefslogtreecommitdiffstats
path: root/security/commoncap.c
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2012-01-03 12:25:16 -0500
committerZiyan <jaraidaniel@gmail.com>2016-03-11 16:01:28 +0100
commit2907c63164e760c45af71ba78effb2fb6ac1048c (patch)
tree27b1bb9bfc9e02f89fff397bcd21e7fa85ea08b5 /security/commoncap.c
parent0c872e788687fa211856b9a5bc145525431a656c (diff)
downloadkernel_samsung_espresso10-2907c63164e760c45af71ba78effb2fb6ac1048c.zip
kernel_samsung_espresso10-2907c63164e760c45af71ba78effb2fb6ac1048c.tar.gz
kernel_samsung_espresso10-2907c63164e760c45af71ba78effb2fb6ac1048c.tar.bz2
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 'security/commoncap.c')
-rw-r--r--security/commoncap.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/security/commoncap.c b/security/commoncap.c
index 02b69b0..0a80697 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -61,14 +61,6 @@ int cap_netlink_send(struct sock *sk, struct sk_buff *skb)
return 0;
}
-int cap_netlink_recv(struct sk_buff *skb, int cap)
-{
- if (!cap_raised(current_cap(), cap))
- return -EPERM;
- return 0;
-}
-EXPORT_SYMBOL(cap_netlink_recv);
-
/**
* cap_capable - Determine whether a task has a particular effective capability
* @cred: The credentials to use