summaryrefslogtreecommitdiffstats
path: root/net/sysctl_net.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-04-19 13:22:55 +0000
committerDavid S. Miller <davem@davemloft.net>2012-04-20 21:21:17 -0400
commit4344475797a16ef948385780943f7a5cf09f0675 (patch)
tree1cd80eae7c46a1e3f2f5c546212d84d007a5dffa /net/sysctl_net.c
parent2ca794e5e86c800d7f98c4ebb8bd325099c0afe8 (diff)
downloadlinux-stable-4344475797a16ef948385780943f7a5cf09f0675.tar.gz
linux-stable-4344475797a16ef948385780943f7a5cf09f0675.tar.bz2
linux-stable-4344475797a16ef948385780943f7a5cf09f0675.zip
net: Kill register_sysctl_rotable
register_sysctl_rotable never caught on as an interesting way to register sysctls. My take on the situation is that what we want are sysctls that we can only see in the initial network namespace. What we have implemented with register_sysctl_rotable are sysctls that we can see in all of the network namespaces and can only change in the initial network namespace. That is a very silly way to go. Just register the network sysctls in the initial network namespace and we don't have any weird special cases to deal with. The sysctls affected are: /proc/sys/net/ipv4/ipfrag_secret_interval /proc/sys/net/ipv4/ipfrag_max_dist /proc/sys/net/ipv6/ip6frag_secret_interval /proc/sys/net/ipv6/mld_max_msf I really don't expect anyone will miss them if they can't read them in a child user namespace. CC: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sysctl_net.c')
-rw-r--r--net/sysctl_net.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/net/sysctl_net.c b/net/sysctl_net.c
index ce97237b653f..2b8d1d950987 100644
--- a/net/sysctl_net.c
+++ b/net/sysctl_net.c
@@ -59,19 +59,6 @@ static struct ctl_table_root net_sysctl_root = {
.permissions = net_ctl_permissions,
};
-static int net_ctl_ro_header_perms(struct ctl_table_root *root,
- struct nsproxy *namespaces, struct ctl_table *table)
-{
- if (net_eq(namespaces->net_ns, &init_net))
- return table->mode;
- else
- return table->mode & ~0222;
-}
-
-static struct ctl_table_root net_sysctl_ro_root = {
- .permissions = net_ctl_ro_header_perms,
-};
-
static int __net_init sysctl_net_init(struct net *net)
{
setup_sysctl_set(&net->sysctls, &net_sysctl_root, is_seen);
@@ -103,8 +90,6 @@ __init int net_sysctl_init(void)
ret = register_pernet_subsys(&sysctl_pernet_ops);
if (ret)
goto out;
- setup_sysctl_set(&net_sysctl_ro_root.default_set, &net_sysctl_ro_root, NULL);
- register_sysctl_root(&net_sysctl_ro_root);
register_sysctl_root(&net_sysctl_root);
out:
return ret;
@@ -117,14 +102,6 @@ struct ctl_table_header *register_net_sysctl_table(struct net *net,
}
EXPORT_SYMBOL_GPL(register_net_sysctl_table);
-struct ctl_table_header *register_net_sysctl_rotable(const
- struct ctl_path *path, struct ctl_table *table)
-{
- return __register_sysctl_paths(&net_sysctl_ro_root.default_set,
- path, table);
-}
-EXPORT_SYMBOL_GPL(register_net_sysctl_rotable);
-
struct ctl_table_header *register_net_sysctl(struct net *net,
const char *path, struct ctl_table *table)
{