objectstore: use private bind mounts for get()

Use `--make-private` for the bind mount in `ObjectStore.get`.
This commit is contained in:
Christian Kellner 2020-02-18 16:06:56 +01:00 committed by Tom Gundersen
parent 9b61f50792
commit e610fa9659

View file

@ -150,7 +150,7 @@ class ObjectStore:
with self.tempdir() as tmp:
if object_id:
path = self.resolve_ref(object_id)
subprocess.run(["mount", "-o", "bind,ro,mode=0755", path, tmp], check=True)
subprocess.run(["mount", "--make-private", "-o", "bind,ro,mode=0755", path, tmp], check=True)
try:
yield tmp
finally: