diff options
author | David S. Miller <davem@davemloft.net> | 2012-08-31 15:14:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-31 15:14:18 -0400 |
commit | c32f38619af6302da58835fb292b159bdd96d11f (patch) | |
tree | a5bb4a9c51999557eaa919f27369c70811cd813c /net/netlink/af_netlink.c | |
parent | 761743ebc92df72053e736fce953a5d2e90099d5 (diff) | |
parent | 0dcd5052c8543ef999bcd252cee50b7ae8111e89 (diff) | |
download | linux-c32f38619af6302da58835fb292b159bdd96d11f.tar.gz linux-c32f38619af6302da58835fb292b159bdd96d11f.tar.bz2 linux-c32f38619af6302da58835fb292b159bdd96d11f.zip |
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/af_netlink.c')
-rw-r--r-- | net/netlink/af_netlink.c | 4 |
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, 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; @@ -2149,6 +2150,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(); } |