[UNIX]: Make the unix sysctl tables per-namespace
This is the core. * add the ctl_table_header on the struct net; * make the unix_sysctl_register and _unregister clone the table; * moves calls to them into per-net init and exit callbacks; * move the .data pointer in the proper place. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
1d430b913c
commit
1597fbc0fa
@@ -11,6 +11,8 @@
|
||||
struct proc_dir_entry;
|
||||
struct net_device;
|
||||
struct sock;
|
||||
struct ctl_table_header;
|
||||
|
||||
struct net {
|
||||
atomic_t count; /* To decided when the network
|
||||
* namespace should be freed.
|
||||
@@ -41,6 +43,7 @@ struct net {
|
||||
|
||||
/* unix sockets */
|
||||
int sysctl_unix_max_dgram_qlen;
|
||||
struct ctl_table_header *unix_ctl;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
|
Reference in New Issue
Block a user