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 ac31891967da..050a2110d43f 100644 --- a/net/can/gw.c +++ b/net/can/gw.c | |||
@@ -804,7 +804,7 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
804 | u8 limhops = 0; | 804 | u8 limhops = 0; |
805 | int err = 0; | 805 | int err = 0; |
806 | 806 | ||
807 | if (!capable(CAP_NET_ADMIN)) | 807 | if (!netlink_capable(skb, CAP_NET_ADMIN)) |
808 | return -EPERM; | 808 | return -EPERM; |
809 | 809 | ||
810 | if (nlmsg_len(nlh) < sizeof(*r)) | 810 | if (nlmsg_len(nlh) < sizeof(*r)) |
@@ -893,7 +893,7 @@ static int cgw_remove_job(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
893 | u8 limhops = 0; | 893 | u8 limhops = 0; |
894 | int err = 0; | 894 | int err = 0; |
895 | 895 | ||
896 | if (!capable(CAP_NET_ADMIN)) | 896 | if (!netlink_capable(skb, CAP_NET_ADMIN)) |
897 | return -EPERM; | 897 | return -EPERM; |
898 | 898 | ||
899 | if (nlmsg_len(nlh) < sizeof(*r)) | 899 | if (nlmsg_len(nlh) < sizeof(*r)) |