aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-08-31 15:14:10 -0400
committerDavid S. Miller <davem@davemloft.net>2012-08-31 15:14:18 -0400
commitc32f38619af6302da58835fb292b159bdd96d11f (patch)
treea5bb4a9c51999557eaa919f27369c70811cd813c /net/netlink
parent761743ebc92df72053e736fce953a5d2e90099d5 (diff)
parent0dcd5052c8543ef999bcd252cee50b7ae8111e89 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Merge the 'net' tree to get the recent set of netfilter bug fixes in order to assist with some merge hassles Pablo is going to have to deal with for upcoming changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/af_netlink.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index aacfb1df9567..382119917166 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1375,7 +1375,8 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
1375 dst_pid = addr->nl_pid; 1375 dst_pid = addr->nl_pid;
1376 dst_group = ffs(addr->nl_groups); 1376 dst_group = ffs(addr->nl_groups);
1377 err = -EPERM; 1377 err = -EPERM;
1378 if (dst_group && !netlink_capable(sock, NL_NONROOT_SEND)) 1378 if ((dst_group || dst_pid) &&
1379 !netlink_capable(sock, NL_NONROOT_SEND))
1379 goto out; 1380 goto out;
1380 } else { 1381 } else {
1381 dst_pid = nlk->dst_pid; 1382 dst_pid = nlk->dst_pid;
@@ -2149,6 +2150,7 @@ static void __init netlink_add_usersock_entry(void)
2149 rcu_assign_pointer(nl_table[NETLINK_USERSOCK].listeners, listeners); 2150 rcu_assign_pointer(nl_table[NETLINK_USERSOCK].listeners, listeners);
2150 nl_table[NETLINK_USERSOCK].module = THIS_MODULE; 2151 nl_table[NETLINK_USERSOCK].module = THIS_MODULE;
2151 nl_table[NETLINK_USERSOCK].registered = 1; 2152 nl_table[NETLINK_USERSOCK].registered = 1;
2153 nl_table[NETLINK_USERSOCK].nl_nonroot = NL_NONROOT_SEND;
2152 2154
2153 netlink_table_ungrab(); 2155 netlink_table_ungrab();
2154} 2156}