net: Fix ns_capable check in sock_diag_put_filterinfo

The caller needs capabilities on the namespace being queried, not on
their own namespace.  This is a security bug, although it likely has
only a minor impact.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
3 files changed