Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6462805c authored by Zim's avatar Zim
Browse files

Allow the FUSE daemon access to Android/ on non-sdcardfs devices

Today, the FUSE daemon has access to Android/ because it has a
writable sdcardfs view.

On devices without sdcardfs, it will not have this view and will need
the two new ext_data_rw and ext_obb_rw. In future cl, we will give
these gids to access_mtp, so we optimistically add the FUSE daemon in
the condition for access to Android/

Test: m
Bug: 148555237
Change-Id: Ia4dd36236d302842c89f5cd13b3235805f235224
parent f6e58c9f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1572,8 +1572,11 @@ public final class ProcessList {
        if (userGid != UserHandle.ERR_GID) {
            gidList.add(userGid);
        }
        if (mountExternal == Zygote.MOUNT_EXTERNAL_ANDROID_WRITABLE) {
        if (mountExternal == Zygote.MOUNT_EXTERNAL_ANDROID_WRITABLE
                || mountExternal == Zygote.MOUNT_EXTERNAL_PASS_THROUGH) {
            // For DownloadProviders and MTP: To grant access to /sdcard/Android/
            // And a special case for the FUSE daemon since it runs an MTP server and should have
            // access to Android/
            gidList.add(UserHandle.getUid(UserHandle.getUserId(uid), Process.SDCARD_RW_GID));
        }
        if (mountExternal == Zygote.MOUNT_EXTERNAL_PASS_THROUGH) {