am 47f0531e: am 4fc30636: am 1bd078fa: Protect runtime storage mount points.

* commit '47f0531ec9adf7a29873ccdb11a1ee7b11e76c80':
  Protect runtime storage mount points.
gugelfrei
Jeff Sharkey 9 years ago committed by Android Git Automerger
commit 228f9509e1

@ -61,9 +61,9 @@ status_t EmulatedVolume::doMount() {
label = "emulated";
}
mFuseDefault = StringPrintf("/mnt/runtime_default/%s", label.c_str());
mFuseRead = StringPrintf("/mnt/runtime_read/%s", label.c_str());
mFuseWrite = StringPrintf("/mnt/runtime_write/%s", label.c_str());
mFuseDefault = StringPrintf("/mnt/runtime/default/%s", label.c_str());
mFuseRead = StringPrintf("/mnt/runtime/read/%s", label.c_str());
mFuseWrite = StringPrintf("/mnt/runtime/write/%s", label.c_str());
setInternalPath(mRawPath);
setPath(StringPrintf("/storage/%s", label.c_str()));

@ -112,9 +112,9 @@ status_t PublicVolume::doMount() {
mRawPath = StringPrintf("/mnt/media_rw/%s", stableName.c_str());
mFuseDefault = StringPrintf("/mnt/runtime_default/%s", stableName.c_str());
mFuseRead = StringPrintf("/mnt/runtime_read/%s", stableName.c_str());
mFuseWrite = StringPrintf("/mnt/runtime_write/%s", stableName.c_str());
mFuseDefault = StringPrintf("/mnt/runtime/default/%s", stableName.c_str());
mFuseRead = StringPrintf("/mnt/runtime/read/%s", stableName.c_str());
mFuseWrite = StringPrintf("/mnt/runtime/write/%s", stableName.c_str());
setInternalPath(mRawPath);
if (getMountFlags() & MountFlags::kVisible) {

@ -580,11 +580,11 @@ int VolumeManager::remountUid(uid_t uid, const std::string& mode) {
std::string storageSource;
if (mode == "default") {
storageSource = "/mnt/runtime_default";
storageSource = "/mnt/runtime/default";
} else if (mode == "read") {
storageSource = "/mnt/runtime_read";
storageSource = "/mnt/runtime/read";
} else if (mode == "write") {
storageSource = "/mnt/runtime_write";
storageSource = "/mnt/runtime/write";
} else {
// Sane default of no storage visible
_exit(0);

Loading…
Cancel
Save