summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sandboxlib/linux_user_chroot.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/sandboxlib/linux_user_chroot.py b/sandboxlib/linux_user_chroot.py
index 943bde5..979d5d5 100644
--- a/sandboxlib/linux_user_chroot.py
+++ b/sandboxlib/linux_user_chroot.py
@@ -100,6 +100,14 @@ def args_for_mount(mount_source, mount_target, mount_type, mount_options,
mount_type)
else:
args = ['--mount-bind', mount_source, mount_target]
+ elif mount_options and all(opt in mount_options.split(",")
+ for opt in ("remount", "ro")):
+ if not is_none(mount_type):
+ raise AssertionError(
+ "Type cannot be specified for 'remount,ro' mounts. Got '%s'" %
+ mount_type)
+ else:
+ args = ['--mount-readonly', mount_target]
else:
raise AssertionError(
"Unsupported mount type '%s' for linux-user-chroot backend." %