userns: make each net (net_ns) belong to a user_ns
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 14 Jun 2012 09:31:10 +0000 (02:31 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Mon, 19 Nov 2012 06:46:23 +0000 (22:46 -0800)
commit038e7332b8d4c0629a2965e3ede1a92e8e427bd6
tree3c449f3ea38036322da200533a75f8835191ed68
parentd727abcb2355566a3372ee1810f156fba75112b7
userns: make each net (net_ns) belong to a user_ns

The user namespace which creates a new network namespace owns that
namespace and all resources created in it.  This way we can target
capability checks for privileged operations against network resources to
the user_ns which created the network namespace in which the resource
lives.  Privilege to the user namespace which owns the network
namespace, or any parent user namespace thereof, provides the same
privilege to the network resource.

This patch is reworked from a version originally by
Serge E. Hallyn <serge.hallyn@canonical.com>

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
include/net/net_namespace.h
kernel/nsproxy.c
net/core/net_namespace.c