Merge changes I6c9c2bf5,I23991692
* changes: Tighten pwd/grp iteration tests. Cleanup some trivial TODOs.
This commit is contained in:
commit
03581d7aa9
4 changed files with 5 additions and 22 deletions
|
@ -209,7 +209,6 @@ static int send_prop_msg(const prop_msg* msg) {
|
|||
// mostly for ctl.* properties, but we do try and wait 250
|
||||
// ms so callers who do read-after-write can reliably see
|
||||
// what they've written. Most of the time.
|
||||
// TODO: fix the system properties design.
|
||||
async_safe_format_log(ANDROID_LOG_WARN, "libc",
|
||||
"Property service has timed out while trying to set \"%s\" to \"%s\"",
|
||||
msg->name, msg->value);
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <stddef.h> /* For ptrdiff_t. */
|
||||
#include <stdint.h> /* TODO: don't drag in all the macros, just the types. */
|
||||
#include <stdint.h>
|
||||
// Include uchar.h only when available. Bionic's stdatomic.h is also used for
|
||||
// the host (via a copy in prebuilts/clang) and uchar.h is not available in the
|
||||
// glibc used for the host.
|
||||
|
|
|
@ -114,8 +114,6 @@ static void ListFree(List** list) {
|
|||
}
|
||||
|
||||
// The below two functions are duplicated from label_support.c in libselinux.
|
||||
// TODO: Find a location suitable for these functions such that both libc and
|
||||
// libselinux can share a common source file.
|
||||
|
||||
// The read_spec_entries and read_spec_entry functions may be used to
|
||||
// replace sscanf to read entries from spec files. The file and
|
||||
|
|
|
@ -405,8 +405,8 @@ static void expect_ids(T ids, bool is_group) {
|
|||
}
|
||||
expect_range(AID_ISOLATED_START, AID_ISOLATED_END);
|
||||
|
||||
// TODO(73062966): We still don't have a good way to create vendor AIDs in the system or other
|
||||
// non-vendor partitions, therefore we keep this check disabled.
|
||||
// Prior to R, we didn't have a mechanism to create vendor AIDs in the system or other non-vendor
|
||||
// partitions, therefore we disabled the rest of these checks for older API levels.
|
||||
if (android::base::GetIntProperty("ro.product.first_api_level", 0) <= 29) {
|
||||
return;
|
||||
}
|
||||
|
@ -462,14 +462,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();
|
||||
|
@ -812,14 +805,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] == nullptr) << "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();
|
||||
|
|
Loading…
Reference in a new issue