Richard Guy Briggs 4f52090052 netlink: have netlink per-protocol bind function return an error code.
Have the netlink per-protocol optional bind function return an int error code
rather than void to signal a failure.

This will enable netlink protocols to perform extra checks including
capabilities and permissions verifications when updating memberships in
multicast groups.

In netlink_bind() and netlink_setsockopt() the call to the per-protocol bind
function was moved above the multicast group update to prevent any access to
the multicast socket groups before checking with the per-protocol bind
function.  This will enable the per-protocol bind function to be used to check
permissions which could be denied before making them available, and to avoid
the messy job of undoing the addition should the per-protocol bind function
fail.

The netfilter subsystem seems to be the only one currently using the
per-protocol bind function.

Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-04-22 21:42:26 -04:00
..
2014-04-22 21:27:57 -04:00
2014-01-21 18:13:05 -08:00
2014-04-20 18:18:55 -04:00
2014-02-12 19:26:32 -05:00
2013-09-23 16:52:45 -04:00
2013-10-19 19:36:19 -04:00
2014-04-22 21:17:53 -04:00
2013-11-21 13:09:42 -05:00
2014-04-16 15:15:05 -04:00