aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
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 /kernel
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 'kernel')
-rw-r--r--kernel/audit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index 9395003..76177c7 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -598,13 +598,13 @@ static int audit_netlink_ok(struct sk_buff *skb, u16 msg_type)
case AUDIT_TTY_SET:
case AUDIT_TRIM:
case AUDIT_MAKE_EQUIV:
- if (security_netlink_recv(skb, CAP_AUDIT_CONTROL))
+ if (!capable(CAP_AUDIT_CONTROL))
err = -EPERM;
break;
case AUDIT_USER:
case AUDIT_FIRST_USER_MSG ... AUDIT_LAST_USER_MSG:
case AUDIT_FIRST_USER_MSG2 ... AUDIT_LAST_USER_MSG2:
- if (security_netlink_recv(skb, CAP_AUDIT_WRITE))
+ if (!capable(CAP_AUDIT_WRITE))
err = -EPERM;
break;
default: /* bad msg */