mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-23 00:17:42 +00:00
Fix magisk --stop by making mirror shared
Previously mirror is private and then unshared to zygote, which makes magisk --stop cannot propagate umount mirror to zygote.
This commit is contained in:
parent
deedb462a0
commit
06687abffc
@ -341,8 +341,12 @@ bool MagiskD::post_fs_data() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
early_abort:
|
early_abort:
|
||||||
|
auto mirror_dir = get_magisk_tmp() + "/"s MIRRDIR;
|
||||||
// We still do magic mount because root itself might need it
|
// We still do magic mount because root itself might need it
|
||||||
load_modules();
|
load_modules();
|
||||||
|
// make mirror dir as a shared mount to make magisk --stop work for other ns
|
||||||
|
xmount(nullptr, mirror_dir.data(), nullptr, MS_SHARED | MS_REC, nullptr);
|
||||||
|
LOGD("make %s shared\n", mirror_dir.data());
|
||||||
return safe_mode;
|
return safe_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user