Fix su file not found after su (#5)

This commit is contained in:
Nullptr
2022-12-19 19:37:26 +08:00
committed by GitHub
parent c19869c1cc
commit 85d4cbd92d
2 changed files with 5 additions and 5 deletions

View File

@@ -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) {

View File

@@ -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);
}