UserManager.setUserName: clearCallingId pre-Broadcast
UserManagerService.setUserName sends a broadcast to all users. Without doing clearCallingIdentity first, it would require INTERACT_ACROSS_USERS permission, which is not required for this function. Bug: 128576953 Test: Manual Change-Id: Ia577248f48234eb9b73e53f9f9da04a86c324e12
This commit is contained in:
@@ -1299,7 +1299,12 @@ public class UserManagerService extends IUserManager.Stub {
|
||||
}
|
||||
}
|
||||
if (changed) {
|
||||
sendUserInfoChangedBroadcast(userId);
|
||||
long ident = Binder.clearCallingIdentity();
|
||||
try {
|
||||
sendUserInfoChangedBroadcast(userId);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(ident);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user