These sysctls only modify namespace-local XFRM protocol settings, and are used by 'libreswan' package.
https://jira.sw.ru/browse/PSBM-132916 Signed-off-by: Nikita Yushchenko <[email protected]> --- net/xfrm/xfrm_sysctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/xfrm/xfrm_sysctl.c b/net/xfrm/xfrm_sysctl.c index 05a6e3d9c258..de612e6e6f63 100644 --- a/net/xfrm/xfrm_sysctl.c +++ b/net/xfrm/xfrm_sysctl.c @@ -1,5 +1,6 @@ #include <linux/sysctl.h> #include <linux/slab.h> +#include <linux/ve.h> #include <net/net_namespace.h> #include <net/xfrm.h> @@ -54,8 +55,8 @@ int __net_init xfrm_sysctl_init(struct net *net) table[2].data = &net->xfrm.sysctl_larval_drop; table[3].data = &net->xfrm.sysctl_acq_expires; - /* Don't export sysctls to unprivileged users */ - if (net->user_ns != &init_user_ns) + /* Export sysctls only to root userns of the host or the container */ + if (ve_net_hide_sysctl(net)) table[0].procname = NULL; net->xfrm.sysctl_hdr = register_net_sysctl(net, "net/core", table); -- 2.20.1 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
