From 8526413941a1ffa85a100643326128fe57adc5e0 Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Wed, 7 Feb 2018 10:55:56 -0800 Subject: [PATCH] allow config/sdcardfs directory to be seen for ARC++ Normally, the whole configfs is mounted on /config and /config will be word readable: sailfish:/ $ ls -ld /config/* drwxrwx--- 258 system package_info 0 2018-05-08 16:08 /config/sdcardfs sailfish:/ $ ls -ld /config/ drwxr-xr-x 3 root root 0 1969-12-31 16:00 /config/ On ARC++, we only mount-bind config/sdcardfs, so it is important that /config is set properly. It is actually 0500, so system could not see /config/sdcardfs, even if /config/sdcardfs is set properly: Although root can, as system uid, we can not reach /config/sdcardfs: :/ $ ls -ld /config dr-x------ 3 root root 31 2018-05-02 21:56 /config :/ $ ls -ld /config/sdcardfs ls: /config/sdcardfs: Permission denied With this change, system (and systemservice) is able to reach /config/sdcardfs: :/ $ ls -ld /config dr-xr-xr-x 3 root root 31 2018-05-02 21:56 /config :/ $ ls -ld /config/sdcardfs drwxrwx--- 109 system package_info 0 2018-05-08 15:29 /config/sdcardfs Bug: 63876697 Test: After change, package service is able to create the bindings in /config/sdcardfs. Change-Id: I7e9b99d7af2ad001fbb1b95bee35d494e861be78 Signed-off-by: Gwendal Grignou --- libcutils/fs_config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcutils/fs_config.cpp b/libcutils/fs_config.cpp index 0f2b46075..cd61d950d 100644 --- a/libcutils/fs_config.cpp +++ b/libcutils/fs_config.cpp @@ -62,7 +62,7 @@ static inline uint64_t get8LE(const uint8_t* src) { static const struct fs_path_config android_dirs[] = { // clang-format off { 00770, AID_SYSTEM, AID_CACHE, 0, "cache" }, - { 00500, AID_ROOT, AID_ROOT, 0, "config" }, + { 00555, AID_ROOT, AID_ROOT, 0, "config" }, { 00771, AID_SYSTEM, AID_SYSTEM, 0, "data/app" }, { 00771, AID_SYSTEM, AID_SYSTEM, 0, "data/app-private" }, { 00771, AID_SYSTEM, AID_SYSTEM, 0, "data/app-ephemeral" },