summaryrefslogtreecommitdiffstats
path: root/src/volatile-root
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-03-25 17:04:38 +0100
committerLennart Poettering <lennart@poettering.net>2019-03-25 19:33:55 +0100
commit64e82c1976ebab0c7788149da42e5193e9ca2dfb (patch)
tree1907a6227d0fc5c33c79425d908ff3de07d64333 /src/volatile-root
parentmount-util: use set_put_strdup() where appropriate (diff)
downloadsystemd-64e82c1976ebab0c7788149da42e5193e9ca2dfb.tar.xz
systemd-64e82c1976ebab0c7788149da42e5193e9ca2dfb.zip
mount-util: beef up bind_remount_recursive() to be able to toggle more than MS_RDONLY
The function is otherwise generic enough to toggle other bind mount flags beyond MS_RDONLY (for example: MS_NOSUID or MS_NODEV), hence let's beef it up slightly to support that too.
Diffstat (limited to 'src/volatile-root')
-rw-r--r--src/volatile-root/volatile-root.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/volatile-root/volatile-root.c b/src/volatile-root/volatile-root.c
index 701f5a2832..d1193a7a24 100644
--- a/src/volatile-root/volatile-root.c
+++ b/src/volatile-root/volatile-root.c
@@ -42,7 +42,7 @@ static int make_volatile(const char *path) {
if (r < 0)
goto finish_umount;
- r = bind_remount_recursive("/run/systemd/volatile-sysroot/usr", true, NULL);
+ r = bind_remount_recursive("/run/systemd/volatile-sysroot/usr", MS_RDONLY, MS_RDONLY, NULL);
if (r < 0) {
log_error_errno(r, "Failed to remount /usr read-only: %m");
goto finish_umount;