am 1bd078fa
: Protect runtime storage mount points.
* commit '1bd078fa7b5ca613cb3e793d67ccd86d2602787d': Protect runtime storage mount points.
This commit is contained in:
commit
4fc3063606
3 changed files with 9 additions and 9 deletions
|
@ -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…
Reference in a new issue