Skip to content

Commit

Permalink
kernel: fix incorrect invalidate for manager in work profile
Browse files Browse the repository at this point in the history
  • Loading branch information
tiann committed Apr 21, 2023
1 parent 80c85b3 commit 76b1165
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kernel/uid_observer.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ static void do_update_uid(struct work_struct *work)
// first, check if manager_uid exist!
bool manager_exist = false;
list_for_each_entry (np, &uid_list, list) {
if (np->uid == ksu_get_manager_uid()) {
// if manager is installed in work profile, the uid in packages.list is still equals main profile
// don't delete it in this case!
int manager_uid = ksu_get_manager_uid() % 100000;
if (np->uid == manager_uid) {
manager_exist = true;
break;
}
Expand Down

0 comments on commit 76b1165

Please sign in to comment.