Fix su file not found after su (#5)
This commit is contained in:
@@ -87,6 +87,11 @@ exit:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ksu_is_allow_uid(uid_t uid) {
|
bool ksu_is_allow_uid(uid_t uid) {
|
||||||
|
if (uid == 0) {
|
||||||
|
// already root
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
struct perm_data *p = NULL;
|
struct perm_data *p = NULL;
|
||||||
struct list_head *pos = NULL;
|
struct list_head *pos = NULL;
|
||||||
list_for_each(pos, &allow_list) {
|
list_for_each(pos, &allow_list) {
|
||||||
|
|||||||
@@ -140,11 +140,6 @@ static bool is_allow_su() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uid == 0) {
|
|
||||||
// we are already root, allow!
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ksu_is_allow_uid(uid);
|
return ksu_is_allow_uid(uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user