diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-02-28 21:39:53 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-02-28 21:39:53 +0000 |
commit | e897961332286f3ec13072e19611563f6d554cec (patch) | |
tree | c6655a235ea66b576c2a2dbd130a628bda9b00f9 | |
parent | fafb12b7d6500c884dbeb2bc3678ee57042d163e (diff) | |
parent | d719e7b76be50e3f2a8bd04749914fea16bdff85 (diff) | |
download | vold-simpleperf-release.tar.gz |
Merge "Snap for 11510257 from cc2f93829ceda04f917cc09472072037c11fbce6 to simpleperf-release" into simpleperf-releasesimpleperf-release
-rw-r--r-- | AppFuseUtil.cpp | 17 | ||||
-rw-r--r-- | FsCrypt.cpp | 12 | ||||
-rw-r--r-- | Utils.cpp | 4 | ||||
-rw-r--r-- | Utils.h | 1 |
4 files changed, 9 insertions, 25 deletions
diff --git a/AppFuseUtil.cpp b/AppFuseUtil.cpp index 711e70b5..a3beaec1 100644 --- a/AppFuseUtil.cpp +++ b/AppFuseUtil.cpp @@ -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) { const auto opts = StringPrintf( - "fd=%i," - "rootmode=40000," - "default_permissions," - "allow_other," - "user_id=0,group_id=0," - "context=\"u:object_r:app_fuse_file:s0\"," - "fscontext=u:object_r:app_fusefs:s0", - device_fd); + "fd=%i," + "rootmode=40000," + "default_permissions," + "allow_other," + "max_read=65536," + "user_id=0,group_id=0," + "context=\"u:object_r:app_fuse_file:s0\"," + "fscontext=u:object_r:app_fusefs:s0", + device_fd); const int result = TEMP_FAILURE_RETRY(mount("/dev/fuse", path.c_str(), "fuse", diff --git a/FsCrypt.cpp b/FsCrypt.cpp index 7fe8be45..51b35c51 100644 --- a/FsCrypt.cpp +++ b/FsCrypt.cpp @@ -44,8 +44,6 @@ #include "android/os/IVold.h" -#define MANAGE_MISC_DIRS 0 - #include <cutils/fs.h> #include <cutils/properties.h> @@ -907,7 +905,6 @@ bool fscrypt_prepare_user_storage(const std::string& volume_uuid, userid_t user_ if (flags & android::os::IVold::STORAGE_FLAG_DE) { // DE_sys key auto system_legacy_path = android::vold::BuildDataSystemLegacyPath(user_id); - auto misc_legacy_path = android::vold::BuildDataMiscLegacyPath(user_id); auto profiles_de_path = android::vold::BuildDataProfilesDePath(user_id); // DE_n key @@ -937,11 +934,6 @@ bool fscrypt_prepare_user_storage(const std::string& volume_uuid, userid_t user_ if (volume_uuid.empty()) { if (!prepare_dir(system_legacy_path, 0700, AID_SYSTEM, AID_SYSTEM)) return false; -#if MANAGE_MISC_DIRS - if (!prepare_dir(misc_legacy_path, 0750, multiuser_get_uid(user_id, AID_SYSTEM), - multiuser_get_uid(user_id, AID_EVERYBODY))) - return false; -#endif if (!prepare_dir(profiles_de_path, 0771, AID_SYSTEM, AID_SYSTEM)) return false; if (!prepare_dir_with_policy(system_de_path, 0770, AID_SYSTEM, AID_SYSTEM, de_policy)) @@ -1050,7 +1042,6 @@ bool fscrypt_destroy_user_storage(const std::string& volume_uuid, userid_t user_ if (flags & android::os::IVold::STORAGE_FLAG_DE) { // DE_sys key auto system_legacy_path = android::vold::BuildDataSystemLegacyPath(user_id); - auto misc_legacy_path = android::vold::BuildDataMiscLegacyPath(user_id); auto profiles_de_path = android::vold::BuildDataProfilesDePath(user_id); // DE_n key @@ -1063,9 +1054,6 @@ bool fscrypt_destroy_user_storage(const std::string& volume_uuid, userid_t user_ res &= destroy_dir(misc_de_path); if (volume_uuid.empty()) { res &= destroy_dir(system_legacy_path); -#if MANAGE_MISC_DIRS - res &= destroy_dir(misc_legacy_path); -#endif res &= destroy_dir(profiles_de_path); res &= destroy_dir(system_de_path); res &= destroy_dir(vendor_de_path); @@ -1116,10 +1116,6 @@ std::string BuildDataSystemDePath(userid_t userId) { return StringPrintf("%s/system_de/%u", BuildDataPath("").c_str(), userId); } -std::string BuildDataMiscLegacyPath(userid_t userId) { - return StringPrintf("%s/misc/user/%u", BuildDataPath("").c_str(), userId); -} - // Keep in sync with installd (frameworks/native/cmds/installd/utils.h) std::string BuildDataProfilesDePath(userid_t userId) { return StringPrintf("%s/misc/profiles/cur/%u", BuildDataPath("").c_str(), userId); @@ -148,7 +148,6 @@ std::string BuildKeyPath(const std::string& partGuid); std::string BuildDataSystemLegacyPath(userid_t userid); std::string BuildDataSystemCePath(userid_t userid); std::string BuildDataSystemDePath(userid_t userid); -std::string BuildDataMiscLegacyPath(userid_t userid); std::string BuildDataProfilesDePath(userid_t userid); std::string BuildDataVendorCePath(userid_t userid); std::string BuildDataVendorDePath(userid_t userid); |