Skip to content
Commit 8a3a6ffa authored by Robert Sesek's avatar Robert Sesek
Browse files

In MountEmulatedStorage() don't create a mount namespace unless actually mounting.

When the zygote starts, it creates its own mount namespace in
nativeUnmountStorageOnInit(). When the zygote forks a new process, unless the
new process actually has permission to access emulated storage (and thus it
needs to be mounted), there is no reason to create another new mount namespace
in the child.

This supports the WebView zygote, which does not have CAP_SYS_ADMIN to perform
mount operations. But since it only forks isolated_app processes, which do not
have access to storage, it does not need to handle mounting.

Test: m checkbuild
Test: angler boots

Bug: 21643067
Change-Id: Ieb75cc3009ed26b7366213409d5fad836f597084
parent 678ba245
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment