Merge "Add REMOUNT_MODE_ANDROID_WRITABLE."
diff --git a/Utils.cpp b/Utils.cpp
index 46272f6..a798b27 100644
--- a/Utils.cpp
+++ b/Utils.cpp
@@ -1056,8 +1056,16 @@
return -1;
}
linkpath += "/primary";
-
Symlink(fuse_path + "/" + std::to_string(user_id), linkpath);
+
+ std::string pass_through_linkpath(StringPrintf("/mnt/pass_through/%d/self", user_id));
+ result = PrepareDir(pass_through_linkpath, 0755, AID_ROOT, AID_ROOT);
+ if (result != android::OK) {
+ PLOG(ERROR) << "Failed to prepare directory " << pass_through_linkpath;
+ return -1;
+ }
+ pass_through_linkpath += "/primary";
+ Symlink(pass_through_path + "/" + std::to_string(user_id), pass_through_linkpath);
}
// Open fuse fd.