From 234f696ea7f97dc489290827c1c68f26279de294 Mon Sep 17 00:00:00 2001 From: "Torne (Richard Coles)" Date: Thu, 22 May 2014 18:40:21 +0100 Subject: [PATCH] Add UID and directory for RELRO sharing support. Define a UID to be used by the process responsible for creating shared RELRO files for the WebView native library, and create a directory owned by that UID to use to store the files. Bug: 13005501 Change-Id: I5bbb1e1035405e5534b2681f554fe16f74e3da1a --- include/private/android_filesystem_config.h | 3 +++ rootdir/init.rc | 1 + 2 files changed, 4 insertions(+) diff --git a/include/private/android_filesystem_config.h b/include/private/android_filesystem_config.h index d662107ed..f5289c180 100644 --- a/include/private/android_filesystem_config.h +++ b/include/private/android_filesystem_config.h @@ -77,6 +77,7 @@ #define AID_SDCARD_AV 1034 /* external storage audio/video access */ #define AID_SDCARD_ALL 1035 /* access all users external storage */ #define AID_LOGD 1036 /* log daemon */ +#define AID_SHARED_RELRO 1037 /* creator of shared GNU RELRO files */ #define AID_SHELL 2000 /* adb and debug shell user */ #define AID_CACHE 2001 /* cache access */ @@ -153,6 +154,7 @@ static const struct android_id_info android_ids[] = { { "sdcard_av", AID_SDCARD_AV, }, { "sdcard_all", AID_SDCARD_ALL, }, { "logd", AID_LOGD, }, + { "shared_relro", AID_SHARED_RELRO, }, { "shell", AID_SHELL, }, { "cache", AID_CACHE, }, @@ -198,6 +200,7 @@ static const struct fs_path_config android_dirs[] = { { 00771, AID_SHELL, AID_SHELL, 0, "data/local" }, { 01771, AID_SYSTEM, AID_MISC, 0, "data/misc" }, { 00770, AID_DHCP, AID_DHCP, 0, "data/misc/dhcp" }, + { 00771, AID_SHARED_RELRO, AID_SHARED_RELRO, 0, "data/misc/shared_relro" }, { 00775, AID_MEDIA_RW, AID_MEDIA_RW, 0, "data/media" }, { 00775, AID_MEDIA_RW, AID_MEDIA_RW, 0, "data/media/Music" }, { 00771, AID_SYSTEM, AID_SYSTEM, 0, "data" }, diff --git a/rootdir/init.rc b/rootdir/init.rc index ed756e09c..2ea3cd608 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -227,6 +227,7 @@ on post-fs-data mkdir /data/misc/sms 0770 system radio mkdir /data/misc/zoneinfo 0775 system system mkdir /data/misc/vpn 0770 system vpn + mkdir /data/misc/shared_relro 0771 shared_relro shared_relro mkdir /data/misc/systemkeys 0700 system system mkdir /data/misc/wifi 0770 wifi wifi mkdir /data/misc/wifi/sockets 0770 wifi wifi