diff options
author | Tom Cherry <tomcherry@google.com> | 2018-02-12 10:49:13 -0800 |
---|---|---|
committer | Tom Cherry <tomcherry@google.com> | 2018-02-12 10:49:13 -0800 |
commit | 41986a013a10c6f79822002800a9afe90efba4f2 (patch) | |
tree | f736c2bf52ae95d5b5317e4c5efc91000b7a507f | |
parent | ab8c86159738a774ca99a5b3311e5e3b81fc8ce9 (diff) | |
download | android_bionic-41986a013a10c6f79822002800a9afe90efba4f2.tar.gz android_bionic-41986a013a10c6f79822002800a9afe90efba4f2.tar.bz2 android_bionic-41986a013a10c6f79822002800a9afe90efba4f2.zip |
Revert "Remove a check for AIDs in the OEM range."
We now have a proper mechanism for OEMs to create new AIDs via
config.fs and /vendor/etc/{passwd,group}. This means that there is no
reason for OEMs to add AIDs by modifying android_filesystem_config.h,
and therefore we can add this check back.
Bug: 27999086
Test: pwd and grp tests pass with custom AIDs in config.fs
This reverts commit a14485addeacc23587743dad307184c00224b823.
Change-Id: I74a28ff267a595e83cf692b27fd8b5170a021f54
-rw-r--r-- | tests/grp_pwd_test.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/tests/grp_pwd_test.cpp b/tests/grp_pwd_test.cpp index 61748c871..a905faeee 100644 --- a/tests/grp_pwd_test.cpp +++ b/tests/grp_pwd_test.cpp @@ -257,14 +257,7 @@ TEST(pwd, getpwent_iterate) { EXPECT_STREQ("/data", pwd->pw_dir) << "pwd->pw_uid: " << pwd->pw_uid; } - // TODO(b/27999086): fix this check with the OEM range - // If OEMs add their own AIDs to private/android_filesystem_config.h, this check will fail. - // Long term we want to create a better solution for OEMs adding AIDs, but we're not there - // yet, so therefore we do not check for uid's in the OEM range. - if (!(pwd->pw_uid >= 2900 && pwd->pw_uid <= 2999) && - !(pwd->pw_uid >= 5000 && pwd->pw_uid <= 5999)) { - EXPECT_EQ(0U, uids.count(pwd->pw_uid)) << "pwd->pw_uid: " << pwd->pw_uid; - } + EXPECT_EQ(0U, uids.count(pwd->pw_uid)) << "pwd->pw_uid: " << pwd->pw_uid; uids.emplace(pwd->pw_uid); } endpwent(); @@ -494,14 +487,7 @@ TEST(grp, getgrent_iterate) { EXPECT_STREQ(grp->gr_name, grp->gr_mem[0]) << "grp->gr_gid: " << grp->gr_gid; EXPECT_TRUE(grp->gr_mem[1] == NULL) << "grp->gr_gid: " << grp->gr_gid; - // TODO(b/27999086): fix this check with the OEM range - // If OEMs add their own AIDs to private/android_filesystem_config.h, this check will fail. - // Long term we want to create a better solution for OEMs adding AIDs, but we're not there - // yet, so therefore we do not check for gid's in the OEM range. - if (!(grp->gr_gid >= 2900 && grp->gr_gid <= 2999) && - !(grp->gr_gid >= 5000 && grp->gr_gid <= 5999)) { - EXPECT_EQ(0U, gids.count(grp->gr_gid)) << "grp->gr_gid: " << grp->gr_gid; - } + EXPECT_EQ(0U, gids.count(grp->gr_gid)) << "grp->gr_gid: " << grp->gr_gid; gids.emplace(grp->gr_gid); } endgrent(); |