Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322418
b: refs/heads/master
c: 20e1db1
h: refs/heads/master
v: v3
  • Loading branch information
Pablo Neira Ayuso authored and David S. Miller committed Aug 24, 2012
1 parent 6d3a266 commit f43066f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bd4242dfe85470b9caecbd049310518f9b9e3f14
refs/heads/master: 20e1db19db5d6b9e4e83021595eab0dc8f107bef
4 changes: 3 additions & 1 deletion trunk/net/netlink/af_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,8 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
dst_pid = addr->nl_pid;
dst_group = ffs(addr->nl_groups);
err = -EPERM;
if (dst_group && !netlink_capable(sock, NL_NONROOT_SEND))
if ((dst_group || dst_pid) &&
!netlink_capable(sock, NL_NONROOT_SEND))
goto out;
} else {
dst_pid = nlk->dst_pid;
Expand Down Expand Up @@ -2147,6 +2148,7 @@ static void __init netlink_add_usersock_entry(void)
rcu_assign_pointer(nl_table[NETLINK_USERSOCK].listeners, listeners);
nl_table[NETLINK_USERSOCK].module = THIS_MODULE;
nl_table[NETLINK_USERSOCK].registered = 1;
nl_table[NETLINK_USERSOCK].nl_nonroot = NL_NONROOT_SEND;

netlink_table_ungrab();
}
Expand Down

0 comments on commit f43066f

Please sign in to comment.