diff options
Diffstat (limited to 'net/can/gw.c')
-rw-r--r-- | net/can/gw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/can/gw.c b/net/can/gw.c index 3ee690e8c7d3..de25455b4e3e 100644 --- a/net/can/gw.c +++ b/net/can/gw.c @@ -784,7 +784,7 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh) struct cgw_job *gwj; int err = 0; - if (!capable(CAP_NET_ADMIN)) + if (!netlink_capable(skb, CAP_NET_ADMIN)) return -EPERM; if (nlmsg_len(nlh) < sizeof(*r)) @@ -876,7 +876,7 @@ static int cgw_remove_job(struct sk_buff *skb, struct nlmsghdr *nlh) struct can_can_gw ccgw; int err = 0; - if (!capable(CAP_NET_ADMIN)) + if (!netlink_capable(skb, CAP_NET_ADMIN)) return -EPERM; if (nlmsg_len(nlh) < sizeof(*r)) |