Merge changes from topic "fuse_fix_shell"

* changes:
  Vold mkdirs should use lower filesystem.
  Use the default sdcardfs view for the Android/ bind-mount.
gugelfrei
Martijn Coenen 5 years ago committed by Android (Google) Code Review
commit 5e289ee859

@ -809,8 +809,9 @@ int VolumeManager::unmountAll() {
int VolumeManager::mkdirs(const std::string& path) {
// Only offer to create directories for paths managed by vold
if (StartsWith(path, "/storage/")) {
std::string lower_path = "/mnt/runtime/default/" + path.substr(9);
// fs_mkdirs() does symlink checking and relative path enforcement
return fs_mkdirs(path.c_str(), 0700);
return fs_mkdirs(lower_path.c_str(), 0700);
} else {
LOG(ERROR) << "Failed to find mounted volume for " << path;
return -EINVAL;

@ -75,7 +75,7 @@ static status_t mountFuseBindMounts(int userId, const std::string& label) {
// TODO(b/134706060) we don't actually want to mount the "write" view by
// default, since it gives write access to all OBB dirs.
std::string androidSource(
StringPrintf("/mnt/runtime/write/%s/%d/Android", label.c_str(), userId));
StringPrintf("/mnt/runtime/default/%s/%d/Android", label.c_str(), userId));
std::string androidTarget(
StringPrintf("/mnt/user/%d/%s/%d/Android", userId, label.c_str(), userId));

Loading…
Cancel
Save