summaryrefslogtreecommitdiff
path: root/libc/malloc_hooks/malloc_hooks.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2019-04-25 10:34:07 -0700
committerTom Cherry <tomcherry@google.com>2019-05-29 15:54:50 -0700
commit6b116d1bbff7a422557886484db54d705a26d2e8 (patch)
treef90012c32573c71d7e1e181baa1ba14f3fb2cad3 /libc/malloc_hooks/malloc_hooks.cpp
parentc3c492965995a2bd5cfe12846f5038c4d7d2c91e (diff)
Make 'app' users/groups more accurate
In an attempt to make bionic's reporting of users and groups more accurate, this change makes the user / group functions do the following: 1) Fail to query a uid/gid for a secondary user when the uid/gid doesn't exist. Currently bionic would return successfully but with a empty string for the name. 2) Fail to query a platform uid/gid, except a limited pre-allocated set for a secondary user, as these are not used by second users. 3) Fail to query uids for all users for the GID-only app ranges: CACHE_GID, EXT_GID, EXT_CACHE_GID, SHARED_GID. 4) Fail to query gids in SHARED_GID range for secondary users, as these GIDs are only allocated for the first user. 5) Use "u#_a#_ext" and u#_a#_ext_cache" for EXT_GID and EXT_CACHE_GID ranges. This both allows querying based on these names and returning these names for the appropriate uids/gids. This also consolidates the tests for better readability. Test: these unit tests, boot Change-Id: I59a1af0792e7806d423439582e56ce7f9f801c94
Diffstat (limited to 'libc/malloc_hooks/malloc_hooks.cpp')
0 files changed, 0 insertions, 0 deletions