summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Sharkey2017-01-18 18:04:21 -0600
committerJeff Sharkey2017-01-18 18:11:05 -0600
commit7e5d0b1fae241ba5fe7a6f909ad99346167cb2ed (patch)
tree2c84b8010421053f94f9e1c52146d57d650d12ba /include
parent230201dcbf2f3ee178402a739f22ba7e45841cac (diff)
downloadplatform-system-core-7e5d0b1fae241ba5fe7a6f909ad99346167cb2ed.tar.gz
platform-system-core-7e5d0b1fae241ba5fe7a6f909ad99346167cb2ed.tar.xz
platform-system-core-7e5d0b1fae241ba5fe7a6f909ad99346167cb2ed.zip
Define GID range for external data and OBBs.
To quickly answer the question of "how much data is a UID using?" we need a GID range to label files on external storage, similar to the GID ranges already defined for cached and shared data. Also define a new GID that will be used to label the OBB files shared between all users under /data/media/obb. Test: builds, newly added tests pass Bug: 34263266 Change-Id: I16fb7d166c3dcdeafbf477162d191d3b73ae8ac2
Diffstat (limited to 'include')
-rw-r--r--include/cutils/multiuser.h1
-rw-r--r--include/private/android_filesystem_config.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/cutils/multiuser.h b/include/cutils/multiuser.h
index 4f23776df..5bd9c7b82 100644
--- a/include/cutils/multiuser.h
+++ b/include/cutils/multiuser.h
@@ -32,6 +32,7 @@ extern appid_t multiuser_get_app_id(uid_t uid);
32extern uid_t multiuser_get_uid(userid_t user_id, appid_t app_id); 32extern uid_t multiuser_get_uid(userid_t user_id, appid_t app_id);
33 33
34extern gid_t multiuser_get_cache_gid(userid_t user_id, appid_t app_id); 34extern gid_t multiuser_get_cache_gid(userid_t user_id, appid_t app_id);
35extern gid_t multiuser_get_ext_gid(userid_t user_id, appid_t app_id);
35extern gid_t multiuser_get_shared_gid(userid_t user_id, appid_t app_id); 36extern gid_t multiuser_get_shared_gid(userid_t user_id, appid_t app_id);
36 37
37/* TODO: switch callers over to multiuser_get_shared_gid() */ 38/* TODO: switch callers over to multiuser_get_shared_gid() */
diff --git a/include/private/android_filesystem_config.h b/include/private/android_filesystem_config.h
index 7db28d8f4..8e2bc1cbe 100644
--- a/include/private/android_filesystem_config.h
+++ b/include/private/android_filesystem_config.h
@@ -127,6 +127,7 @@
127#define AID_MEDIA_VIDEO 1056 /* GID for video files on internal media storage */ 127#define AID_MEDIA_VIDEO 1056 /* GID for video files on internal media storage */
128#define AID_MEDIA_IMAGE 1057 /* GID for image files on internal media storage */ 128#define AID_MEDIA_IMAGE 1057 /* GID for image files on internal media storage */
129#define AID_TOMBSTONED 1058 /* tombstoned user */ 129#define AID_TOMBSTONED 1058 /* tombstoned user */
130#define AID_MEDIA_OBB 1059 /* GID for OBB files on internal media storage */
130/* Changes to this file must be made in AOSP, *not* in internal branches. */ 131/* Changes to this file must be made in AOSP, *not* in internal branches. */
131 132
132#define AID_SHELL 2000 /* adb and debug shell user */ 133#define AID_SHELL 2000 /* adb and debug shell user */
@@ -165,6 +166,9 @@
165#define AID_CACHE_GID_START 20000 /* start of gids for apps to mark cached data */ 166#define AID_CACHE_GID_START 20000 /* start of gids for apps to mark cached data */
166#define AID_CACHE_GID_END 29999 /* end of gids for apps to mark cached data */ 167#define AID_CACHE_GID_END 29999 /* end of gids for apps to mark cached data */
167 168
169#define AID_EXT_GID_START 30000 /* start of gids for apps to mark external data */
170#define AID_EXT_GID_END 39999 /* end of gids for apps to mark external data */
171
168#define AID_SHARED_GID_START 50000 /* start of gids for apps in each user to share */ 172#define AID_SHARED_GID_START 50000 /* start of gids for apps in each user to share */
169#define AID_SHARED_GID_END 59999 /* end of gids for apps in each user to share */ 173#define AID_SHARED_GID_END 59999 /* end of gids for apps in each user to share */
170 174