Don't reuse userids that are being cleaned up on boot
During the current session, if we're cleaning up some old users, mark them as being in the remove pile so that the userIds are not reused right away. Otherwise there's a potential for confusing the file-based crypto layer. Bug: 29635364 Change-Id: I57a868fbe6c58a02ffcea63809d25eba01360e1e
This commit is contained in:
@@ -471,6 +471,8 @@ public class UserManagerService extends IUserManager.Stub {
|
||||
UserInfo ui = mUsers.valueAt(i).info;
|
||||
if ((ui.partial || ui.guestToRemove || ui.isEphemeral()) && i != 0) {
|
||||
partials.add(ui);
|
||||
mRemovingUserIds.append(ui.id, true);
|
||||
ui.partial = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user