net: Allow userns root to control tun and tap devices
authorEric W. Biederman <ebiederm@xmission.com>
Sun, 18 Nov 2012 21:34:11 +0000 (21:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Nov 2012 19:15:54 +0000 (14:15 -0500)
commitc260b7722f8c21963d0f0347f7fc203da9ee1a6b
tree8d42f13a5cedbcd5d442d6f02e132f9a65372e7a
parent3594698a1fb8e5ae60a92c72ce9ca280256939a7
net: Allow userns root to control tun and tap devices

Allow an unpriviled user who has created a user namespace, and then
created a network namespace to effectively use the new network
namespace, by reducing capable(CAP_NET_ADMIN) calls to
ns_capable(net->user_ns,CAP_NET_ADMIN) calls.

Allow setting of the tun iff flags.
Allow creating of tun devices.
Allow adding a new queue to a tun device.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c