[NET] sysctl: make the sys.net.core sysctls per-namespace
authorPavel Emelyanov <xemul@openvz.org>
Sat, 8 Dec 2007 08:09:24 +0000 (00:09 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:56:56 +0000 (14:56 -0800)
commit024626e36d75fc8c6e32d50d4c68bfc3b8df5fdf
treeada6c8c215a5c4fa57e9e34f3b139609b95b2c5f
parentcbbb90e68cd073b8d63b491166066e347902b7e9
[NET] sysctl: make the sys.net.core sysctls per-namespace

Making them per-namespace is required for the following
two reasons:

 First, some ctl values have a per-namespace meaning.
 Second, making them writable from the sub-namespace
 is an isolation hole.

So I introduce the pernet operations to create these
tables. For init_net I use the existing statically
declared tables, for sub-namespace they are duplicated
and the write bits are removed from the mode.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/net_namespace.h
net/core/sysctl_net_core.c