Change ownership of apex data directories to root.
The apex data directories must be accessed by apexd in order for it to
perform snapshot and restore as part of the rollback process. As apexd
runs as root, this CL changes the apex data directories under misc_[ce|de]
to be owned by root.
Bug: 141148175
Test: Build and flash; check permissions are set correctly.
Change-Id: Icf2059cc9448364f834eef7892914a99883746a1
diff --git a/vold_prepare_subdirs.cpp b/vold_prepare_subdirs.cpp
index 3a58b2e..c6cf687 100644
--- a/vold_prepare_subdirs.cpp
+++ b/vold_prepare_subdirs.cpp
@@ -138,7 +138,7 @@
if (strchr(name, '@') != NULL) continue;
- if (!prepare_dir(sehandle, 0700, AID_SYSTEM, AID_SYSTEM, path + "/apexdata/" + name)) {
+ if (!prepare_dir(sehandle, 0770, AID_ROOT, AID_SYSTEM, path + "/apexdata/" + name)) {
return false;
}
}