Commit 4a5911e8 by Przemek Rudy Committed by Stéphane Graber

Prevent from error on umount /proc if userns are used.

parent 5035cbc7
...@@ -1368,10 +1368,8 @@ int prepare_ramfs_root(char *root) ...@@ -1368,10 +1368,8 @@ int prepare_ramfs_root(char *root)
break; break;
} }
if (umount2("./proc", MNT_DETACH)) { /* This also can be skipped if a container uses unserns */
SYSERROR("Unable to umount /proc"); umount2("./proc", MNT_DETACH);
return -1;
}
/* It is weird, but chdir("..") moves us in a new root */ /* It is weird, but chdir("..") moves us in a new root */
if (chdir("..") == -1) { if (chdir("..") == -1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment