Handle multi-user mountObb() requests.
Mount OBB containers using shared app GID, so that an app can read
the mount point across users.
Bug: 7212801
Change-Id: Ia1be52df9854c259b20728111f3a2c9facf4beaa
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index 0388010..ca5ec84 100644
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -1001,7 +1001,7 @@
/**
* Mounts an image file <code>img</code>.
*/
-int VolumeManager::mountObb(const char *img, const char *key, int ownerUid) {
+int VolumeManager::mountObb(const char *img, const char *key, int ownerGid) {
char mountPoint[255];
char idHash[33];
@@ -1085,7 +1085,7 @@
}
}
- if (Fat::doMount(dmDevice, mountPoint, true, false, true, ownerUid, 0,
+ if (Fat::doMount(dmDevice, mountPoint, true, false, true, 0, ownerGid,
0227, false)) {
SLOGE("Image mount failed (%s)", strerror(errno));
if (cleanupDm) {