ksud: use MS_RDONLY when mounting overlayfs (#490)

fix https://github.com/tiann/KernelSU/issues/489
This commit is contained in:
5ec1cff
2023-05-13 16:17:22 +08:00
committed by GitHub
parent 09ecc2c9b5
commit da46dfbde1

View File

@@ -149,6 +149,7 @@ fn mount_overlayfs(
Mount::builder() Mount::builder()
.fstype(FilesystemType::from("overlay")) .fstype(FilesystemType::from("overlay"))
.data(&options) .data(&options)
.flags(MountFlags::RDONLY)
.mount(KSU_OVERLAY_SOURCE, dest.as_ref()) .mount(KSU_OVERLAY_SOURCE, dest.as_ref())
.with_context(|| { .with_context(|| {
format!( format!(