diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-09-29 14:19:22 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-09-29 14:36:29 +0200 |
commit | 896f937f58f42284dbebcd0a7f5ddc87fd5517b7 (patch) | |
tree | faa018ccc9c5c3d7d367008abff4134bb7e43666 /src/shared/dissect-image.c | |
parent | man: move non-target units together (#6934) (diff) | |
download | systemd-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/dissect-image.c')
-rw-r--r-- | src/shared/dissect-image.c | 3 |
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; |