Merge "libcutils: fs_config() add check /odm/etc/fs_config_*" am: 1e62880f70 am: e1d2e3436e
am: cdbdf087bd

Change-Id: Ia4c97d29b9813c4ee233b0d62397f11bd79fb020
diff --git a/libcutils/fs_config.c b/libcutils/fs_config.c
index 68412a0..50b44cb 100644
--- a/libcutils/fs_config.c
+++ b/libcutils/fs_config.c
@@ -116,16 +116,21 @@
  * although the developer is advised to restrict the scope to the /vendor or
  * oem/ file-system since the intent is to provide support for customized
  * portions of a separate vendor.img or oem.img.  Has to remain open so that
- * customization can also land on /system/vendor or /system/orm.  We expect
- * build-time checking or filtering when constructing the associated
- * fs_config_* files.
+ * customization can also land on /system/vendor, /system/oem or /system/odm.
+ * We expect build-time checking or filtering when constructing the associated
+ * fs_config_* files (see build/tools/fs_config/fs_config_generate.c)
  */
 static const char ven_conf_dir[] = "/vendor/etc/fs_config_dirs";
 static const char ven_conf_file[] = "/vendor/etc/fs_config_files";
 static const char oem_conf_dir[] = "/oem/etc/fs_config_dirs";
 static const char oem_conf_file[] = "/oem/etc/fs_config_files";
+static const char odm_conf_dir[] = "/odm/etc/fs_config_dirs";
+static const char odm_conf_file[] = "/odm/etc/fs_config_files";
 static const char* conf[][2] = {
-    {sys_conf_file, sys_conf_dir}, {ven_conf_file, ven_conf_dir}, {oem_conf_file, oem_conf_dir},
+    {sys_conf_file, sys_conf_dir},
+    {ven_conf_file, ven_conf_dir},
+    {oem_conf_file, oem_conf_dir},
+    {odm_conf_file, odm_conf_dir},
 };
 
 static const struct fs_path_config android_files[] = {
@@ -142,6 +147,8 @@
     { 00600, AID_ROOT,      AID_ROOT,      0, "default.prop" },
     { 00600, AID_ROOT,      AID_ROOT,      0, "odm/build.prop" },
     { 00600, AID_ROOT,      AID_ROOT,      0, "odm/default.prop" },
+    { 00444, AID_ROOT,      AID_ROOT,      0, odm_conf_dir + 1 },
+    { 00444, AID_ROOT,      AID_ROOT,      0, odm_conf_file + 1 },
     { 00444, AID_ROOT,      AID_ROOT,      0, oem_conf_dir + 1 },
     { 00444, AID_ROOT,      AID_ROOT,      0, oem_conf_file + 1 },
     { 00750, AID_ROOT,      AID_SHELL,     0, "sbin/fs_mgr" },