mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-24 02:25:28 +00:00
On denylist != do unmount
This commit is contained in:
parent
63cfe7b47b
commit
db20f65d7c
@ -140,7 +140,7 @@ DCL_HOOK_FUNC(int, fork) {
|
|||||||
// This is the latest point where we can still connect to the magiskd main socket
|
// This is the latest point where we can still connect to the magiskd main socket
|
||||||
DCL_HOOK_FUNC(int, selinux_android_setcontext,
|
DCL_HOOK_FUNC(int, selinux_android_setcontext,
|
||||||
uid_t uid, int isSystemServer, const char *seinfo, const char *pkgname) {
|
uid_t uid, int isSystemServer, const char *seinfo, const char *pkgname) {
|
||||||
if (g_ctx && g_ctx->info.on_denylist) {
|
if (g_ctx && g_ctx->flags[DENY_FLAG]) {
|
||||||
if (remote_request_unmount() == 0) {
|
if (remote_request_unmount() == 0) {
|
||||||
LOGD("zygisk: mount namespace cleaned up\n");
|
LOGD("zygisk: mount namespace cleaned up\n");
|
||||||
}
|
}
|
||||||
@ -247,6 +247,7 @@ void HookContext::nativeSpecializeAppProcess_pre() {
|
|||||||
/* TODO: Handle MOUNT_EXTERNAL_NONE */
|
/* TODO: Handle MOUNT_EXTERNAL_NONE */
|
||||||
if (args->mount_external != 0 && info.on_denylist) {
|
if (args->mount_external != 0 && info.on_denylist) {
|
||||||
LOGI("zygisk: [%s] is on the denylist\n", process);
|
LOGI("zygisk: [%s] is on the denylist\n", process);
|
||||||
|
flags[DENY_FLAG] = true;
|
||||||
} else {
|
} else {
|
||||||
run_modules_pre();
|
run_modules_pre();
|
||||||
}
|
}
|
||||||
@ -260,7 +261,7 @@ void HookContext::nativeSpecializeAppProcess_post() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
env->ReleaseStringUTFChars(args->nice_name, process);
|
env->ReleaseStringUTFChars(args->nice_name, process);
|
||||||
if (info.on_denylist) {
|
if (flags[DENY_FLAG]) {
|
||||||
self_unload();
|
self_unload();
|
||||||
} else {
|
} else {
|
||||||
run_modules_post();
|
run_modules_post();
|
||||||
|
Loading…
Reference in New Issue
Block a user