mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 11:39:56 +00:00
lxc_unshare: make mount table private
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
b235962c17
commit
ecd92dffbc
@ -246,8 +246,13 @@ static int do_start(void *arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((start_arg->flags & CLONE_NEWNS) && start_arg->want_default_mounts)
|
if (start_arg->flags & CLONE_NEWNS) {
|
||||||
lxc_setup_fs();
|
if (mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, 0) < 0)
|
||||||
|
_exit(EXIT_FAILURE);
|
||||||
|
|
||||||
|
if (start_arg->want_default_mounts)
|
||||||
|
lxc_setup_fs();
|
||||||
|
}
|
||||||
|
|
||||||
if ((start_arg->flags & CLONE_NEWUTS) && want_hostname)
|
if ((start_arg->flags & CLONE_NEWUTS) && want_hostname)
|
||||||
if (sethostname(want_hostname, strlen(want_hostname)) < 0) {
|
if (sethostname(want_hostname, strlen(want_hostname)) < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user