From 3eee57eb8ff4c227af03ff60727ecf2cc56c2ac4 Mon Sep 17 00:00:00 2001 From: Nullptr Date: Fri, 21 Apr 2023 08:40:11 +0800 Subject: [PATCH] Fix incorrect ksu denylist meaning --- zygiskd/src/root_impl/kernelsu.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/zygiskd/src/root_impl/kernelsu.rs b/zygiskd/src/root_impl/kernelsu.rs index 35a9c039..a0b0240f 100644 --- a/zygiskd/src/root_impl/kernelsu.rs +++ b/zygiskd/src/root_impl/kernelsu.rs @@ -5,7 +5,6 @@ const KERNEL_SU_OPTION: i32 = 0xdeadbeefu32 as i32; const CMD_GET_VERSION: usize = 2; const CMD_GET_ALLOW_LIST: usize = 5; -const CMD_GET_DENY_LIST: usize = 6; pub enum Version { Supported, @@ -35,9 +34,5 @@ pub fn uid_on_allowlist(uid: i32) -> bool { #[inline(never)] pub fn uid_on_denylist(uid: i32) -> bool { - let mut size = 1024u32; - let mut uids = vec![0; size as usize]; - unsafe { prctl(KERNEL_SU_OPTION, CMD_GET_DENY_LIST, uids.as_mut_ptr(), &mut size as *mut u32) }; - uids.resize(size as usize, 0); - uids.contains(&uid) + false }