Cleanup SELinux mock files

This commit is contained in:
vvb2060 2022-04-09 17:13:30 +08:00 committed by John Wu
parent 18566715e1
commit e1987c42c4

View File

@ -360,8 +360,15 @@ static void daemon_entry() {
return true;
});
}
unlink("/dev/.se");
unlink(mount_list.data());
rm_rf((MAGISKTMP + "/" ROOTOVL).data());
// SELinux mock cleanups
string selinux_mock = MAGISKTMP + "/" SELINUXMOCK;
string fs = selinux_mock + "/fs";
if (access(fs.data(), F_OK) == 0) {
umount2(fs.data(), MNT_DETACH);
}
rm_rf(selinux_mock.data());
// Load config status
auto config = MAGISKTMP + "/" INTLROOT "/config";