OSDN Git Service

Respect force_mount_namespace in MountEmulatedStorage().
authorRobert Sesek <rsesek@google.com>
Fri, 11 Nov 2016 02:50:04 +0000 (21:50 -0500)
committerRobert Sesek <rsesek@google.com>
Fri, 11 Nov 2016 02:50:04 +0000 (21:50 -0500)
In Ieb75cc3009ed26b7366213409d5fad836f597084, the unshare step was
skipped if no storage is required. But the change failed to take the force
parameter into account

Test: m
Test: angler boots
Test: fugu boots

Bug: 21643067
Change-Id: I52447f02fd25f553628564733fd6bf2523c07f7c

core/jni/com_android_internal_os_Zygote.cpp

index 3e111c0..ca09708 100644 (file)
@@ -304,7 +304,7 @@ static bool MountEmulatedStorage(uid_t uid, jint mount_mode,
         storageSource = "/mnt/runtime/read";
     } else if (mount_mode == MOUNT_EXTERNAL_WRITE) {
         storageSource = "/mnt/runtime/write";
-    } else {
+    } else if (!force_mount_namespace) {
         // Sane default of no storage visible
         return true;
     }