mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-26 20:07:39 +00:00
Make sure PPID exists
This commit is contained in:
parent
5b54ef840a
commit
3ebc886f8a
@ -141,11 +141,11 @@ static bool process_pid(int pid) {
|
||||
return true;
|
||||
|
||||
struct stat ns, pns;
|
||||
int ppid = parse_ppid(pid);
|
||||
int ppid;
|
||||
int uid = get_uid(pid);
|
||||
if (hide_uid.count(uid)) {
|
||||
// Make sure we can read mount namespace
|
||||
if (read_ns(pid, &ns) || read_ns(ppid, &pns))
|
||||
if ((ppid = parse_ppid(pid)) < 0 || read_ns(pid, &ns) || read_ns(ppid, &pns))
|
||||
return true;
|
||||
// mount namespace is not separated, we only unmount once
|
||||
if (ns.st_dev == pns.st_dev && ns.st_ino == pns.st_ino)
|
||||
|
Loading…
x
Reference in New Issue
Block a user