mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-02-20 07:18:28 +00:00
Remove UID check, not reliable....
This commit is contained in:
parent
f8fdaf5c1f
commit
0e69201f05
@ -60,15 +60,15 @@ void lazy_unmount(const char* mountpoint) {
|
|||||||
int hideMagisk(int pid, int uid) {
|
int hideMagisk(int pid, int uid) {
|
||||||
struct stat info;
|
struct stat info;
|
||||||
char path[256];
|
char path[256];
|
||||||
snprintf(path, 256, "/proc/%d", pid);
|
// snprintf(path, 256, "/proc/%d", pid);
|
||||||
if (stat(path, &info) == -1) {
|
// if (stat(path, &info) == -1) {
|
||||||
fprintf(logfile, "MagiskHide: Unable to get info for pid=%d\n", pid);
|
// fprintf(logfile, "MagiskHide: Unable to get info for pid=%d\n", pid);
|
||||||
return 1;
|
// return 1;
|
||||||
}
|
// }
|
||||||
if (info.st_uid != uid) {
|
// if (info.st_uid != uid) {
|
||||||
fprintf(logfile, "MagiskHide: Incorrect uid=%d, expect uid=%d\n", info.st_uid, uid);
|
// fprintf(logfile, "MagiskHide: Incorrect uid=%d, expect uid=%d\n", info.st_uid, uid);
|
||||||
return 1;
|
// return 1;
|
||||||
}
|
// }
|
||||||
|
|
||||||
snprintf(path, 256, "/proc/%d/ns/mnt", pid);
|
snprintf(path, 256, "/proc/%d/ns/mnt", pid);
|
||||||
int fd = open(path, O_RDONLY);
|
int fd = open(path, O_RDONLY);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user