From 64e82c1976ebab0c7788149da42e5193e9ca2dfb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 25 Mar 2019 17:04:38 +0100 Subject: 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. --- src/volatile-root/volatile-root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/volatile-root') 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; -- cgit v1.2.3