projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge tag 'byteswap-for-linus-20121219' of git://git.infradead.org/users/dwmw2/byteswap
[cascardo/linux.git]
/
net
/
phonet
/
pn_netlink.c
diff --git
a/net/phonet/pn_netlink.c
b/net/phonet/pn_netlink.c
index
83a8389
..
0193630
100644
(file)
--- a/
net/phonet/pn_netlink.c
+++ b/
net/phonet/pn_netlink.c
@@
-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;