Merge "Reduce AppFuse max read size." into main

This commit is contained in:
Treehugger Robot 2024-02-19 10:39:40 +00:00 committed by Gerrit Code Review
commit 527a52874e

View file

@ -50,14 +50,15 @@ static android::status_t GetMountPath(uid_t uid, const std::string& name, std::s
static android::status_t Mount(int device_fd, const std::string& path) { static android::status_t Mount(int device_fd, const std::string& path) {
const auto opts = StringPrintf( const auto opts = StringPrintf(
"fd=%i," "fd=%i,"
"rootmode=40000," "rootmode=40000,"
"default_permissions," "default_permissions,"
"allow_other," "allow_other,"
"user_id=0,group_id=0," "max_read=65536,"
"context=\"u:object_r:app_fuse_file:s0\"," "user_id=0,group_id=0,"
"fscontext=u:object_r:app_fusefs:s0", "context=\"u:object_r:app_fuse_file:s0\","
device_fd); "fscontext=u:object_r:app_fusefs:s0",
device_fd);
const int result = const int result =
TEMP_FAILURE_RETRY(mount("/dev/fuse", path.c_str(), "fuse", TEMP_FAILURE_RETRY(mount("/dev/fuse", path.c_str(), "fuse",