Merge "Remove ro.vold.level_from_user." am: c0e870af67
am: 972317ce6d
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1535004 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Iaac98f9b15152b36560d5188d848228b9eb28267
This commit is contained in:
commit
cd0758b4ed
3 changed files with 3 additions and 14 deletions
|
@ -794,11 +794,6 @@ bool fscrypt_lock_user_key(userid_t user_id) {
|
||||||
|
|
||||||
static bool prepare_subdirs(const std::string& action, const std::string& volume_uuid,
|
static bool prepare_subdirs(const std::string& action, const std::string& volume_uuid,
|
||||||
userid_t user_id, int flags) {
|
userid_t user_id, int flags) {
|
||||||
// TODO(b/141677108): Remove this & make it the default behavior
|
|
||||||
if (android::base::GetProperty("ro.vold.level_from_user", "1") == "1") {
|
|
||||||
flags |= android::os::IVold::STORAGE_FLAG_LEVEL_FROM_USER;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (0 != android::vold::ForkExecvp(
|
if (0 != android::vold::ForkExecvp(
|
||||||
std::vector<std::string>{prepare_subdirs_path, action, volume_uuid,
|
std::vector<std::string>{prepare_subdirs_path, action, volume_uuid,
|
||||||
std::to_string(user_id), std::to_string(flags)})) {
|
std::to_string(user_id), std::to_string(flags)})) {
|
||||||
|
|
|
@ -168,7 +168,6 @@ interface IVold {
|
||||||
|
|
||||||
const int STORAGE_FLAG_DE = 1;
|
const int STORAGE_FLAG_DE = 1;
|
||||||
const int STORAGE_FLAG_CE = 2;
|
const int STORAGE_FLAG_CE = 2;
|
||||||
const int STORAGE_FLAG_LEVEL_FROM_USER = 4;
|
|
||||||
|
|
||||||
const int REMOUNT_MODE_NONE = 0;
|
const int REMOUNT_MODE_NONE = 0;
|
||||||
const int REMOUNT_MODE_DEFAULT = 1;
|
const int REMOUNT_MODE_DEFAULT = 1;
|
||||||
|
|
|
@ -166,13 +166,9 @@ static bool prepare_apex_subdirs(struct selabel_handle* sehandle, const std::str
|
||||||
static bool prepare_subdirs(const std::string& volume_uuid, int user_id, int flags) {
|
static bool prepare_subdirs(const std::string& volume_uuid, int user_id, int flags) {
|
||||||
struct selabel_handle* sehandle = selinux_android_file_context_handle();
|
struct selabel_handle* sehandle = selinux_android_file_context_handle();
|
||||||
|
|
||||||
const uid_t user_for_level =
|
|
||||||
(flags & android::os::IVold::STORAGE_FLAG_LEVEL_FROM_USER) ? user_id : -1;
|
|
||||||
|
|
||||||
if (flags & android::os::IVold::STORAGE_FLAG_DE) {
|
if (flags & android::os::IVold::STORAGE_FLAG_DE) {
|
||||||
auto user_de_path = android::vold::BuildDataUserDePath(volume_uuid, user_id);
|
auto user_de_path = android::vold::BuildDataUserDePath(volume_uuid, user_id);
|
||||||
if (!prepare_dir_for_user(sehandle, 0771, AID_SYSTEM, AID_SYSTEM, user_de_path,
|
if (!prepare_dir_for_user(sehandle, 0771, AID_SYSTEM, AID_SYSTEM, user_de_path, user_id)) {
|
||||||
user_for_level)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,7 +183,7 @@ static bool prepare_subdirs(const std::string& volume_uuid, int user_id, int fla
|
||||||
|
|
||||||
auto profiles_de_path = android::vold::BuildDataProfilesDePath(user_id);
|
auto profiles_de_path = android::vold::BuildDataProfilesDePath(user_id);
|
||||||
if (!prepare_dir_for_user(sehandle, 0771, AID_SYSTEM, AID_SYSTEM, profiles_de_path,
|
if (!prepare_dir_for_user(sehandle, 0771, AID_SYSTEM, AID_SYSTEM, profiles_de_path,
|
||||||
user_for_level)) {
|
user_id)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,8 +199,7 @@ static bool prepare_subdirs(const std::string& volume_uuid, int user_id, int fla
|
||||||
}
|
}
|
||||||
if (flags & android::os::IVold::STORAGE_FLAG_CE) {
|
if (flags & android::os::IVold::STORAGE_FLAG_CE) {
|
||||||
auto user_ce_path = android::vold::BuildDataUserCePath(volume_uuid, user_id);
|
auto user_ce_path = android::vold::BuildDataUserCePath(volume_uuid, user_id);
|
||||||
if (!prepare_dir_for_user(sehandle, 0771, AID_SYSTEM, AID_SYSTEM, user_ce_path,
|
if (!prepare_dir_for_user(sehandle, 0771, AID_SYSTEM, AID_SYSTEM, user_ce_path, user_id)) {
|
||||||
user_for_level)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue