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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user