nspawn: Don't mount read-only if we have a custom mount on root.
This commit is contained in:
@@ -989,6 +989,19 @@ int mount_custom(
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool has_custom_root_mount(const CustomMount *mounts, size_t n) {
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
const CustomMount *m = mounts + i;
|
||||
|
||||
if (path_equal(m->destination, "/"))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static int setup_volatile_state(const char *directory, uid_t uid_shift, const char *selinux_apifs_context) {
|
||||
|
||||
_cleanup_free_ char *buf = NULL;
|
||||
|
||||
Reference in New Issue
Block a user