From 0e69201f05ab009ac2b7d6c9278eee4d211381eb Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Mon, 14 Nov 2016 04:27:43 +0800 Subject: [PATCH] Remove UID check, not reliable.... --- jni/magiskhide.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/jni/magiskhide.c b/jni/magiskhide.c index 5a0cf2af3..112adea42 100644 --- a/jni/magiskhide.c +++ b/jni/magiskhide.c @@ -60,15 +60,15 @@ void lazy_unmount(const char* mountpoint) { int hideMagisk(int pid, int uid) { struct stat info; char path[256]; - snprintf(path, 256, "/proc/%d", pid); - if (stat(path, &info) == -1) { - fprintf(logfile, "MagiskHide: Unable to get info for pid=%d\n", pid); - return 1; - } - if (info.st_uid != uid) { - fprintf(logfile, "MagiskHide: Incorrect uid=%d, expect uid=%d\n", info.st_uid, uid); - return 1; - } + // snprintf(path, 256, "/proc/%d", pid); + // if (stat(path, &info) == -1) { + // fprintf(logfile, "MagiskHide: Unable to get info for pid=%d\n", pid); + // return 1; + // } + // if (info.st_uid != uid) { + // fprintf(logfile, "MagiskHide: Incorrect uid=%d, expect uid=%d\n", info.st_uid, uid); + // return 1; + // } snprintf(path, 256, "/proc/%d/ns/mnt", pid); int fd = open(path, O_RDONLY);