mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +00:00
zdtm: make root mount private in criu mntns
If root mount in criu mntns is slave, it would be slave of host mount where criu is stored, so if someone mounts something in subdir of {criu-dir}/test/ on host while tests are running this mount can influence the test as it appears on top of root mount in criu mntns. 1) With mount-compat this mount can get into restored test mntns, which means wrong restore, as this mount was not there on dump. 2) With mount-v2 this mount would just fail container restore, as root container mount is mounted non-recursively to protect from unexpected mounts appear after restore. Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
70a9cd6fbf
commit
d12e2364c4
@@ -267,7 +267,7 @@ class ns_flavor:
|
||||
|
||||
def init(self, l_bins, x_bins):
|
||||
subprocess.check_call(
|
||||
["mount", "--make-slave", "--bind", ".", self.root])
|
||||
["mount", "--make-private", "--bind", ".", self.root])
|
||||
self.root_mounted = True
|
||||
|
||||
if not os.access(self.root + "/.constructed", os.F_OK):
|
||||
|
Reference in New Issue
Block a user