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:
+1
-1
@@ -3323,7 +3323,7 @@ static int outer_child(
|
||||
return r;
|
||||
|
||||
if (arg_read_only && arg_volatile_mode == VOLATILE_NO) {
|
||||
r = bind_remount_recursive(directory, true, NULL);
|
||||
r = bind_remount_recursive(directory, MS_RDONLY, MS_RDONLY, NULL);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to make tree read-only: %m");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user