Revert "Set a default ACL on /data/media/userId."
This reverts commit 8688eb4f47
.
Reason for revert: Probably causing b/176240229
Change-Id: Id92d1f1589e8927f372960ec2cc5d262d10ad161
This commit is contained in:
parent
8688eb4f47
commit
94d6c1275d
3 changed files with 2 additions and 14 deletions
|
@ -74,7 +74,6 @@ using android::vold::KeyBuffer;
|
||||||
using android::vold::KeyGeneration;
|
using android::vold::KeyGeneration;
|
||||||
using android::vold::retrieveKey;
|
using android::vold::retrieveKey;
|
||||||
using android::vold::retrieveOrGenerateKey;
|
using android::vold::retrieveOrGenerateKey;
|
||||||
using android::vold::SetDefaultAcl;
|
|
||||||
using android::vold::SetQuotaInherit;
|
using android::vold::SetQuotaInherit;
|
||||||
using android::vold::SetQuotaProjectId;
|
using android::vold::SetQuotaProjectId;
|
||||||
using android::vold::writeStringToFile;
|
using android::vold::writeStringToFile;
|
||||||
|
@ -869,14 +868,6 @@ bool fscrypt_prepare_user_storage(const std::string& volume_uuid, userid_t user_
|
||||||
if (!prepare_dir(vendor_ce_path, 0771, AID_ROOT, AID_ROOT)) return false;
|
if (!prepare_dir(vendor_ce_path, 0771, AID_ROOT, AID_ROOT)) return false;
|
||||||
}
|
}
|
||||||
if (!prepare_dir(media_ce_path, 0770, AID_MEDIA_RW, AID_MEDIA_RW)) return false;
|
if (!prepare_dir(media_ce_path, 0770, AID_MEDIA_RW, AID_MEDIA_RW)) return false;
|
||||||
// On devices without sdcardfs (kernel 5.4+), the path permissions aren't fixed
|
|
||||||
// up automatically; therefore, use a default ACL, to ensure apps with MEDIA_RW
|
|
||||||
// can keep reading external storage; in particular, this allows app cloning
|
|
||||||
// scenarios to work correctly on such devices.
|
|
||||||
int ret = SetDefaultAcl(media_ce_path, 0770, AID_MEDIA_RW, AID_MEDIA_RW, {AID_MEDIA_RW});
|
|
||||||
if (ret != android::OK) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!prepare_dir(user_ce_path, 0771, AID_SYSTEM, AID_SYSTEM)) return false;
|
if (!prepare_dir(user_ce_path, 0771, AID_SYSTEM, AID_SYSTEM)) return false;
|
||||||
|
|
||||||
|
|
|
@ -136,8 +136,8 @@ status_t DestroyDeviceNode(const std::string& path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets a default ACL on the directory.
|
// Sets a default ACL on the directory.
|
||||||
status_t SetDefaultAcl(const std::string& path, mode_t mode, uid_t uid, gid_t gid,
|
int SetDefaultAcl(const std::string& path, mode_t mode, uid_t uid, gid_t gid,
|
||||||
std::vector<gid_t> additionalGids) {
|
std::vector<gid_t> additionalGids) {
|
||||||
if (IsSdcardfsUsed()) {
|
if (IsSdcardfsUsed()) {
|
||||||
// sdcardfs magically takes care of this
|
// sdcardfs magically takes care of this
|
||||||
return OK;
|
return OK;
|
||||||
|
|
3
Utils.h
3
Utils.h
|
@ -52,9 +52,6 @@ std::string GetFuseMountPathForUser(userid_t user_id, const std::string& relativ
|
||||||
status_t CreateDeviceNode(const std::string& path, dev_t dev);
|
status_t CreateDeviceNode(const std::string& path, dev_t dev);
|
||||||
status_t DestroyDeviceNode(const std::string& path);
|
status_t DestroyDeviceNode(const std::string& path);
|
||||||
|
|
||||||
status_t SetDefaultAcl(const std::string& path, mode_t mode, uid_t uid, gid_t gid,
|
|
||||||
std::vector<gid_t> additionalGids);
|
|
||||||
|
|
||||||
status_t AbortFuseConnections();
|
status_t AbortFuseConnections();
|
||||||
|
|
||||||
int SetQuotaInherit(const std::string& path);
|
int SetQuotaInherit(const std::string& path);
|
||||||
|
|
Loading…
Reference in a new issue