aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/commoncap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/security/commoncap.c b/security/commoncap.c
index 64c2ed9c9015..a83e607d91c3 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -52,13 +52,12 @@ static void warn_setuid_and_fcaps_mixed(const char *fname)
52 52
53int cap_netlink_send(struct sock *sk, struct sk_buff *skb) 53int cap_netlink_send(struct sock *sk, struct sk_buff *skb)
54{ 54{
55 NETLINK_CB(skb).eff_cap = current_cap();
56 return 0; 55 return 0;
57} 56}
58 57
59int cap_netlink_recv(struct sk_buff *skb, int cap) 58int cap_netlink_recv(struct sk_buff *skb, int cap)
60{ 59{
61 if (!cap_raised(NETLINK_CB(skb).eff_cap, cap)) 60 if (!cap_raised(current_cap(), cap))
62 return -EPERM; 61 return -EPERM;
63 return 0; 62 return 0;
64} 63}