[Devel] [PATCH 3/3] libvzctl-4.14: do not mount sysfs in container

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Wed Jan 10 19:15:35 MSK 2018


Our current approach is to use one sysfs mount for all the containers, but set
limited visibility to sysfs dentries in a container.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 lib/env.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/lib/env.c b/lib/env.c
index 1b03ce4..a284ec9 100644
--- a/lib/env.c
+++ b/lib/env.c
@@ -772,9 +772,6 @@ int pre_setup_env(const struct start_param *param)
 	if (setup_devtmpfs())
 		return VZCTL_E_SYSTEM;
 
-	if (stat_file("/sys"))
-		mount("sysfs", "/sys", "sysfs", 0, 0);
-
 	if (env->features->mask & VE_FEATURE_NFSD) {
 		mount("nfsd", "/proc/fs/nfsd", "nfsd", 0, 0);
 		make_dir("/var/lib/nfs/rpc_pipefs", 1);



More information about the Devel mailing list