Fix isMountDisallowed to check permissions on the correct user
Currently isMountDisallowed checks permission on a calling user, which is always the system user, since the message handler runs on the background thread. This is not a problem on non-HSUM devices, since DO provisioning happens on the system user and in COPE the permissions are set on the parent profile, which is also the system user. On HSUM devices this is a bug, since DO provisioning happens on user10 and COPE's parent profile is user10 as well. Check permissions on the user which volume is mounted to instead. Test: Verified both on HSUM and non-HSUM devices that the policy WAI. Test: atest StorageManagerServiceTest Flag: EXEMPT bugfix Bug: b/346334511 Bug: b/403258207 Change-Id: I014e88bf2797c69d5546bcd02fe8f0933a11ff0e
Loading
Please register or sign in to comment