dissect: automatically mark partitions read-only that have a read-only file system

Specifically, squashfs and iso9660 are always read-only, hence make sure
we never even think about mounting them writable.
This commit is contained in:
Lennart Poettering
2017-09-29 14:36:29 +02:00
parent 01a65d4180
commit 896f937f58
3 changed files with 17 additions and 0 deletions
+3
View File
@@ -591,6 +591,9 @@ int dissect_image(int fd, const void *root_hash, size_t root_hash_size, DissectI
if (streq_ptr(p->fstype, "crypto_LUKS"))
m->encrypted = true;
if (p->fstype && fstype_is_ro(p->fstype))
p->rw = false;
}
*ret = m;