summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-09-29 14:19:22 +0200
committerLennart Poettering <lennart@poettering.net>2017-09-29 14:36:29 +0200
commit896f937f58f42284dbebcd0a7f5ddc87fd5517b7 (patch)
treefaa018ccc9c5c3d7d367008abff4134bb7e43666 /src/shared
parentman: move non-target units together (#6934) (diff)
downloadsystemd-896f937f58f42284dbebcd0a7f5ddc87fd5517b7.tar.xz
systemd-896f937f58f42284dbebcd0a7f5ddc87fd5517b7.zip
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.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/dissect-image.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c
index f11b522558..b02b2897d3 100644
--- a/src/shared/dissect-image.c
+++ b/src/shared/dissect-image.c
@@ -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;