diff --git a/kernel/allowlist.c b/kernel/allowlist.c index 5b659983..4a1a15a9 100644 --- a/kernel/allowlist.c +++ b/kernel/allowlist.c @@ -87,6 +87,11 @@ exit: } bool ksu_is_allow_uid(uid_t uid) { + if (uid == 0) { + // already root + return true; + } + struct perm_data *p = NULL; struct list_head *pos = NULL; list_for_each(pos, &allow_list) { diff --git a/kernel/ksu.c b/kernel/ksu.c index 0132d232..66b18746 100644 --- a/kernel/ksu.c +++ b/kernel/ksu.c @@ -140,11 +140,6 @@ static bool is_allow_su() { return true; } - if (uid == 0) { - // we are already root, allow! - return true; - } - return ksu_is_allow_uid(uid); }