summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'libcutils/fs_config.cpp')
-rw-r--r--libcutils/fs_config.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/libcutils/fs_config.cpp b/libcutils/fs_config.cpp
index 0f2b46075..6169324cb 100644
--- a/libcutils/fs_config.cpp
+++ b/libcutils/fs_config.cpp
@@ -80,6 +80,7 @@ static const struct fs_path_config android_dirs[] = {
80 { 00775, AID_ROOT, AID_ROOT, 0, "data/preloads" }, 80 { 00775, AID_ROOT, AID_ROOT, 0, "data/preloads" },
81 { 00771, AID_SYSTEM, AID_SYSTEM, 0, "data" }, 81 { 00771, AID_SYSTEM, AID_SYSTEM, 0, "data" },
82 { 00755, AID_ROOT, AID_SYSTEM, 0, "mnt" }, 82 { 00755, AID_ROOT, AID_SYSTEM, 0, "mnt" },
83 { 00755, AID_ROOT, AID_SHELL, 0, "product/bin" },
83 { 00750, AID_ROOT, AID_SHELL, 0, "sbin" }, 84 { 00750, AID_ROOT, AID_SHELL, 0, "sbin" },
84 { 00777, AID_ROOT, AID_ROOT, 0, "sdcard" }, 85 { 00777, AID_ROOT, AID_ROOT, 0, "sdcard" },
85 { 00751, AID_ROOT, AID_SDCARD_R, 0, "storage" }, 86 { 00751, AID_ROOT, AID_SDCARD_R, 0, "storage" },
@@ -195,6 +196,7 @@ static const struct fs_path_config android_files[] = {
195 { 00755, AID_ROOT, AID_ROOT, 0, "bin/*" }, 196 { 00755, AID_ROOT, AID_ROOT, 0, "bin/*" },
196 { 00640, AID_ROOT, AID_SHELL, 0, "fstab.*" }, 197 { 00640, AID_ROOT, AID_SHELL, 0, "fstab.*" },
197 { 00750, AID_ROOT, AID_SHELL, 0, "init*" }, 198 { 00750, AID_ROOT, AID_SHELL, 0, "init*" },
199 { 00755, AID_ROOT, AID_SHELL, 0, "product/bin/*" },
198 { 00750, AID_ROOT, AID_SHELL, 0, "sbin/*" }, 200 { 00750, AID_ROOT, AID_SHELL, 0, "sbin/*" },
199 { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/*" }, 201 { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/*" },
200 { 00755, AID_ROOT, AID_ROOT, 0, "system/lib/valgrind/*" }, 202 { 00755, AID_ROOT, AID_ROOT, 0, "system/lib/valgrind/*" },
@@ -237,9 +239,10 @@ static int fs_config_open(int dir, int which, const char* target_out_path) {
237 return fd; 239 return fd;
238} 240}
239 241
240// if path is "vendor/<stuff>", "oem/<stuff>" or "odm/<stuff>" 242// if path is "odm/<stuff>", "oem/<stuff>", "product/<stuff>" or
243// "vendor/<stuff>"
241static bool is_partition(const char* path, size_t len) { 244static bool is_partition(const char* path, size_t len) {
242 static const char* partitions[] = {"vendor/", "oem/", "odm/"}; 245 static const char* partitions[] = {"odm/", "oem/", "product/", "vendor/"};
243 for (size_t i = 0; i < (sizeof(partitions) / sizeof(partitions[0])); ++i) { 246 for (size_t i = 0; i < (sizeof(partitions) / sizeof(partitions[0])); ++i) {
244 size_t plen = strlen(partitions[i]); 247 size_t plen = strlen(partitions[i]);
245 if (len <= plen) continue; 248 if (len <= plen) continue;