mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 21:37:39 +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
|
||||
DCL_HOOK_FUNC(int, selinux_android_setcontext,
|
||||
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) {
|
||||
LOGD("zygisk: mount namespace cleaned up\n");
|
||||
}
|
||||
@ -247,6 +247,7 @@ void HookContext::nativeSpecializeAppProcess_pre() {
|
||||
/* TODO: Handle MOUNT_EXTERNAL_NONE */
|
||||
if (args->mount_external != 0 && info.on_denylist) {
|
||||
LOGI("zygisk: [%s] is on the denylist\n", process);
|
||||
flags[DENY_FLAG] = true;
|
||||
} else {
|
||||
run_modules_pre();
|
||||
}
|
||||
@ -260,7 +261,7 @@ void HookContext::nativeSpecializeAppProcess_post() {
|
||||
}
|
||||
|
||||
env->ReleaseStringUTFChars(args->nice_name, process);
|
||||
if (info.on_denylist) {
|
||||
if (flags[DENY_FLAG]) {
|
||||
self_unload();
|
||||
} else {
|
||||
run_modules_post();
|
||||
|
Loading…
x
Reference in New Issue
Block a user