From 18566715e1ea05ba9a5a71cdedc59414fcbc0522 Mon Sep 17 00:00:00 2001 From: canyie Date: Fri, 8 Apr 2022 17:44:47 +0800 Subject: [PATCH] Fix MAGISKTMP unmount for CLI --- native/jni/zygisk/deny/cli.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/native/jni/zygisk/deny/cli.cpp b/native/jni/zygisk/deny/cli.cpp index 3f8935394..899b6b453 100644 --- a/native/jni/zygisk/deny/cli.cpp +++ b/native/jni/zygisk/deny/cli.cpp @@ -1,6 +1,7 @@ #include #include +#include #include #include "deny.hpp" @@ -83,6 +84,9 @@ int denylist_cli(int argc, char **argv) { else if (argv[1] == "exec"sv && argc > 2) { xunshare(CLONE_NEWNS); xmount(nullptr, "/", nullptr, MS_PRIVATE | MS_REC, nullptr); + int fd = connect_daemon(MainRequest::GET_PATH); + MAGISKTMP = read_string(fd); + close(fd); revert_unmount(); execvp(argv[2], argv + 2); exit(1);