1
0
Fork 0
alistair23-linux/net/openvswitch
Tycho Andersen 4a92602aa1 openvswitch: allow management from inside user namespaces
Operations with the GENL_ADMIN_PERM flag fail permissions checks because
this flag means we call netlink_capable, which uses the init user ns.

Instead, let's introduce a new flag, GENL_UNS_ADMIN_PERM for operations
which should be allowed inside a user namespace.

The motivation for this is to be able to run openvswitch in unprivileged
containers. I've tested this and it seems to work, but I really have no
idea about the security consequences of this patch, so thoughts would be
much appreciated.

v2: use the GENL_UNS_ADMIN_PERM flag instead of a check in each function
v3: use separate ifs for UNS_ADMIN_PERM and ADMIN_PERM, instead of one
    massive one

Reported-by: James Page <james.page@canonical.com>
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
CC: Eric Biederman <ebiederm@xmission.com>
CC: Pravin Shelar <pshelar@ovn.org>
CC: Justin Pettit <jpettit@nicira.com>
CC: "David S. Miller" <davem@davemloft.net>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-11 09:53:19 -05:00
..
Kconfig openvswitch: Fix dependency on IPv6 defrag. 2015-09-11 15:39:04 -07:00
Makefile openvswitch: Remove conntrack Kconfig option. 2015-09-06 23:48:33 -07:00
actions.c ovs: limit ovs recursions in ovs_execute_actions to not corrupt stack 2016-01-18 12:09:45 -05:00
conntrack.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-12-31 18:20:10 -05:00
conntrack.h openvswitch: Fix double-free on ip_defrag() errors 2015-10-27 19:32:14 -07:00
datapath.c openvswitch: allow management from inside user namespaces 2016-02-11 09:53:19 -05:00
datapath.h openvswitch: Fix egress tunnel info. 2015-10-22 19:39:25 -07:00
dp_notify.c openvswitch: fix hangup on vxlan/gre/geneve device deletion 2015-12-03 14:29:25 -05:00
flow.c openvswitch: add tunnel protocol to sw_flow_key 2015-10-07 04:17:59 -07:00
flow.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-10-20 06:08:27 -07:00
flow_netlink.c openvswitch: correct encoding of set tunnel action attributes 2015-12-18 16:35:35 -05:00
flow_netlink.h openvswitch: Fix egress tunnel info. 2015-10-22 19:39:25 -07:00
flow_table.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-10-20 06:08:27 -07:00
flow_table.h openvswitch: Zero flows on allocation. 2015-09-22 17:33:41 -07:00
vport-geneve.c openvswitch: fix struct geneve_port member name 2016-01-10 23:49:21 -05:00
vport-gre.c openvswitch: properly refcount vport-vxlan module 2015-12-02 11:50:59 -05:00
vport-internal_dev.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-10-24 06:54:12 -07:00
vport-internal_dev.h openvswitch: introduce rtnl ops stub 2014-07-01 14:40:17 -07:00
vport-netdev.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-12-03 21:09:12 -05:00
vport-netdev.h openvswitch: Use dev_queue_xmit for vport send. 2015-10-22 06:46:16 -07:00
vport-vxlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-10-24 06:54:12 -07:00
vport.c openvswitch: properly refcount vport-vxlan module 2015-12-02 11:50:59 -05:00
vport.h openvswitch: update kernel doc for struct vport 2016-01-10 23:49:21 -05:00