diff options
author | 2013-02-21 17:07:14 +0100 | |
---|---|---|
committer | 2013-02-21 17:07:14 +0100 | |
commit | e29371d762df5bb35d2bc434ea266a046e5a0a75 (patch) | |
tree | dac4a8db52d92453415f35606130a49e9f32e4ef /net/unix/sysctl_net_unix.c | |
parent | netfilter: ipset: Fix range bug in hash:ip,port,net (diff) | |
parent | netfilter: nf_ct_reasm: fix per-netns sysctl initialization (diff) | |
download | linux-dev-e29371d762df5bb35d2bc434ea266a046e5a0a75.tar.xz linux-dev-e29371d762df5bb35d2bc434ea266a046e5a0a75.zip |
Merge branch 'master' of git://1984.lsi.us.es/nf
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
-rw-r--r-- | net/unix/sysctl_net_unix.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/unix/sysctl_net_unix.c b/net/unix/sysctl_net_unix.c index b34b5b9792f0..8800604c93f4 100644 --- a/net/unix/sysctl_net_unix.c +++ b/net/unix/sysctl_net_unix.c @@ -34,6 +34,10 @@ int __net_init unix_sysctl_register(struct net *net) if (table == NULL) goto err_alloc; + /* Don't export sysctls to unprivileged users */ + if (net->user_ns != &init_user_ns) + table[0].procname = NULL; + table[0].data = &net->unx.sysctl_max_dgram_qlen; net->unx.ctl = register_net_sysctl(net, "net/unix", table); if (net->unx.ctl == NULL) |