net: Use netlink_ns_capable to verify the permisions of netlink messages
[firefly-linux-kernel-4.4.55.git] / net / netlink / genetlink.c
index 393f17eea1a2f148a4c48a423c1611553473019c..ade434b8abd883400855d3ddddf2a76e578fe347 100644 (file)
@@ -592,7 +592,7 @@ static int genl_family_rcv_msg(struct genl_family *family,
                return -EOPNOTSUPP;
 
        if ((ops->flags & GENL_ADMIN_PERM) &&
-           !capable(CAP_NET_ADMIN))
+           !netlink_capable(skb, CAP_NET_ADMIN))
                return -EPERM;
 
        if (nlh->nlmsg_flags & NLM_F_DUMP) {