Remove a check for AIDs in the OEM range.

Remove the check that AIDs in the OEM range are not defind in
android_filesystem_config, as we do not yet have a good solution for
OEMs to define custom AIDs and what OEMs are currently doing isn't
hurting anything.

Bug: b/64137613
Test: pwd.getpwent_iterate / grp.getgrent_iterate
Change-Id: If98ad4443fe9e827e3f17b3df92eca82763e6290
This commit is contained in:
Tom Cherry 2017-08-04 11:07:19 -07:00
parent 316a44f33c
commit a14485adde
1 changed files with 16 additions and 2 deletions

View File

@ -207,7 +207,14 @@ TEST(pwd, getpwent_iterate) {
application = true;
} else {
ASSERT_STREQ("/", pwd->pw_dir);
ASSERT_FALSE(exist[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)) {
ASSERT_FALSE(exist[pwd->pw_uid]);
}
exist[pwd->pw_uid] = true;
}
}
@ -453,7 +460,14 @@ TEST(grp, getgrent_iterate) {
if (grp->gr_gid >= exist.size()) {
application = true;
} else {
ASSERT_FALSE(exist[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)) {
ASSERT_FALSE(exist[grp->gr_gid]);
}
exist[grp->gr_gid] = true;
}
}