Create root directory for supplemental data during user creation am: a6f36ae8d0
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2005651
Change-Id: Ie7c16c5562932432818ac138abbfce9aa4cb90a6
diff --git a/vold_prepare_subdirs.cpp b/vold_prepare_subdirs.cpp
index 0d58e4d..0fe8b01 100644
--- a/vold_prepare_subdirs.cpp
+++ b/vold_prepare_subdirs.cpp
@@ -172,8 +172,13 @@
return false;
}
+ auto misc_de_path = android::vold::BuildDataMiscDePath(user_id);
+ if (!prepare_dir_for_user(sehandle, 0771, AID_SYSTEM, AID_SYSTEM,
+ misc_de_path + "/supplemental", user_id)) {
+ return false;
+ }
+
if (volume_uuid.empty()) {
- auto misc_de_path = android::vold::BuildDataMiscDePath(user_id);
if (!prepare_dir(sehandle, 0700, 0, 0, misc_de_path + "/vold")) return false;
if (!prepare_dir(sehandle, 0700, 0, 0, misc_de_path + "/storaged")) return false;
if (!prepare_dir(sehandle, 0700, 0, 0, misc_de_path + "/rollback")) return false;
@@ -203,8 +208,13 @@
return false;
}
+ auto misc_ce_path = android::vold::BuildDataMiscCePath(user_id);
+ if (!prepare_dir_for_user(sehandle, 0771, AID_SYSTEM, AID_SYSTEM,
+ misc_ce_path + "/supplemental", user_id)) {
+ return false;
+ }
+
if (volume_uuid.empty()) {
- auto misc_ce_path = android::vold::BuildDataMiscCePath(user_id);
if (!prepare_dir(sehandle, 0700, 0, 0, misc_ce_path + "/vold")) return false;
if (!prepare_dir(sehandle, 0700, 0, 0, misc_ce_path + "/storaged")) return false;
if (!prepare_dir(sehandle, 0700, 0, 0, misc_ce_path + "/rollback")) return false;