if (unshare(CLONE_NEWNS))
return 0;
+ if (mount(NULL, "/", NULL, MS_SLAVE|MS_REC, NULL)) {
+ perror("rslave mount failed");
+ return 0;
+ }
+
sprintf(fnam, "/proc/%d/ns/pid", pid);
fd = open(fnam, O_RDONLY);
if (fd < 0) {
if (!cgm_get_controllers(&d->subsystems))
return -1;
- if (mount(NULL, "/", NULL, MS_REC|MS_SLAVE, 0) < 0) {
- perror("Failed to re-mount / non-shared");
- return -1;
- }
-
ret = fuse_main(argc, argv, &lxcfs_ops, d);
return ret;