]> Pileus Git - ~andy/linux/blobdiff - net/phonet/pn_netlink.c
net: Push capable(CAP_NET_ADMIN) into the rtnl methods
[~andy/linux] / net / phonet / pn_netlink.c
index 83a8389619aa7ccc0a490a8f8b664200bee53df9..0193630d306125a62f273db3165e98a306249fc0 100644 (file)
@@ -70,6 +70,9 @@ static int addr_doit(struct sk_buff *skb, struct nlmsghdr *nlh, void *attr)
        int err;
        u8 pnaddr;
 
+       if (!capable(CAP_NET_ADMIN))
+               return -EPERM;
+
        if (!capable(CAP_SYS_ADMIN))
                return -EPERM;
 
@@ -230,6 +233,9 @@ static int route_doit(struct sk_buff *skb, struct nlmsghdr *nlh, void *attr)
        int err;
        u8 dst;
 
+       if (!capable(CAP_NET_ADMIN))
+               return -EPERM;
+
        if (!capable(CAP_SYS_ADMIN))
                return -EPERM;